Use args.force, not args.f #16
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user