Fix file deletion, now erases folders and files.
This commit is contained in:
parent
cc74912bb9
commit
32b8e0702c
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user