diff options
author | hut <hut@lavabit.com> | 2013-02-05 04:42:10 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2013-02-05 04:42:10 +0100 |
commit | 4095f32154ed738c1b28bbe8e1554cf4aab9c233 (patch) | |
tree | e7e92a85e31961f33e69fa7a1b5d5911da131ca7 /ranger | |
parent | 5036975750fb3447f5a060bf1523773eb25d3313 (diff) | |
download | ranger-4095f32154ed738c1b28bbe8e1554cf4aab9c233.tar.gz |
config/commands: helpful error message for :delete in empty dir
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/config/commands.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py index 74d306e8..f5f5b03d 100644 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -514,6 +514,9 @@ class delete(Command): cwd = self.fm.thisdir cf = self.fm.thisfile + if not cwd or not cf: + self.fm.notify("Error: no file selected for deletion!", bad=True) + return confirm = self.fm.settings.confirm_on_delete many_files = (cwd.marked_items or (cf.is_directory and not cf.is_link \ |