Fix file deletion, now erases folders and files.

This commit is contained in:
Leo Vasanko 2023-11-05 02:19:46 +00:00
parent cc74912bb9
commit 32b8e0702c

View File

@ -44,7 +44,10 @@ class Rm(ControlBase):
root = config.config.path
sel = [root / filename.sanitize(p) for p in self.sel]
for p in sel:
if p.is_dir():
shutil.rmtree(p, ignore_errors=True)
else:
p.unlink()
class Mv(ControlBase):