Merge pull request #16 from mig5/mig/fix-args-force

Use args.force, not args.f
This commit was merged in pull request #16.
This commit is contained in:
Marco D'Aleo
2025-11-17 14:56:00 +00:00
committed by GitHub

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