summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2015-02-12 20:58:05 +0100
committerWojciech Siewierski <wojciech.siewierski@onet.pl>2015-02-12 20:58:05 +0100
commit3630c8a928d242031ba5c67e3103abb4ac9253fa (patch)
tree707b05f3e4599a2892d57a0164fa4b82c0742711
parent9c1f5c2a8c3c803c003babc67e2a933d663315ca (diff)
downloadranger-3630c8a928d242031ba5c67e3103abb4ac9253fa.tar.gz
core.actions: deleting a file with a cached image preview no longer crashes ranger
-rw-r--r--ranger/core/actions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index b3b8f50b..1167dab5 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -879,7 +879,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
         pager = self.ui.get_pager()
         path = file.realpath
 
-        if not path:
+        if not path or not os.path.exists(path):
             return None
 
         if self.settings.preview_images and file.image: