Use args.force, not args.f

This commit is contained in:
Miguel Jacq
2025-11-17 14:11:32 +11:00
parent 7ba20632ab
commit 96f7ebf4fc

View File

@@ -432,7 +432,7 @@ def main(argv: Optional[List[str]] = None):
pth = Path(p)
# simplistic recursive handling: if -r not given and it's a directory, mimic rm behavior: error unless -r
if pth.is_dir() and not args.r:
if args.f:
if args.force:
continue
print(f"resrm: cannot remove '{pth}': Is a directory")
continue