summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-10-09 14:43:06 +0200
committerhut <hut@lepus.uberspace.de>2015-10-09 14:43:06 +0200
commit91d784a677604c4bb82db3007c5606a258971acc (patch)
tree95a0d9c6c1d46589acd52b52b5d39e1e46223c3c
parent8d774594cd2006beeff06b65755579b9b46ca44d (diff)
downloadranger-91d784a677604c4bb82db3007c5606a258971acc.tar.gz
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.
-rw-r--r--ranger/core/actions.py5
1 files 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 <text>