From 3630c8a928d242031ba5c67e3103abb4ac9253fa Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Thu, 12 Feb 2015 20:58:05 +0100 Subject: core.actions: deleting a file with a cached image preview no longer crashes ranger --- ranger/core/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit 1.4.1-2-gfad0