diff --git a/cista/protocol.py b/cista/protocol.py index f793345..8008ac7 100644 --- a/cista/protocol.py +++ b/cista/protocol.py @@ -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: - shutil.rmtree(p, ignore_errors=True) + if p.is_dir(): + shutil.rmtree(p, ignore_errors=True) + else: + p.unlink() class Mv(ControlBase):