summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2013-03-15 17:28:28 +0100
committerhut <hut@lavabit.com>2013-03-15 17:28:28 +0100
commitfd212529eb177af62400b118f5fcc6b27c828f93 (patch)
tree5dc662c7d11f1932bf759058e8ca0c888bb1091a
parent948bb0360cf9b4190e742a9f56cff75be1d7742d (diff)
downloadranger-fd212529eb177af62400b118f5fcc6b27c828f93.tar.gz
settings: make setlocal work with all settings
-rw-r--r--ranger/container/settings.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ranger/container/settings.py b/ranger/container/settings.py
index bec366df..54cbeee6 100644
--- a/ranger/container/settings.py
+++ b/ranger/container/settings.py
@@ -117,6 +117,11 @@ class Settings(SignalDispatcher, FileManagerAware):
 
     def get(self, name, path=None):
         assert name in ALLOWED_SETTINGS, "No such setting: {0}!".format(name)
+        if not path:
+            try:
+                path = self.fm.thisdir.path
+            except:
+                pass
         if path and path in self._localsettings and name in self._localsettings[path]:
             return self._localsettings[path][name]
         elif name in self._settings: