From 91d784a677604c4bb82db3007c5606a258971acc Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 9 Oct 2015 14:43:06 +0200 Subject: core.actions: fixed logic in reload_cwd, you could reach code that used the variable "cwd" even though it wasn't defined. This patch puts this code into an else-block ensuring that cwd is defined. --- ranger/core/actions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 04932f3f..26dcf4f7 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -134,8 +134,9 @@ class Actions(FileManagerAware, SettingsAware): cwd = self.thisdir except: pass - cwd.unload() - cwd.load_content() + else: + cwd.unload() + cwd.load_content() def notify(self, text, duration=4, bad=False): """:notify -- cgit 1.4.1-2-gfad0 lected='selected'>main Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.Kartik K. Agaram <vc@akkartik.com>
about summary refs log blame commit diff stats