Use args.force, not args.f #16

Merged
mig5 merged 1 commits from mig/fix-args-force into main 2025-11-17 14:56:01 +00:00

View File

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