summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2017-06-07 22:26:20 +0200
committerhut <hut@lepus.uberspace.de>2017-06-07 22:26:20 +0200
commitf1e44781ea1ff6734d770781201e8cf22ba30ba0 (patch)
tree781478109f17f10bddaa9a2f95165065599316ea /ranger
parent11fc7da75a0d8d7f0ea21cdf91dbd82d34ead141 (diff)
parent2d366e4f0f80fb845d940afb307281268ee94530 (diff)
downloadranger-f1e44781ea1ff6734d770781201e8cf22ba30ba0.tar.gz
Merge branch 'master' of https://github.com/daizeng1984/ranger
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/main.py22
1 files changed, 9 insertions, 13 deletions
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 38513970..9a0fe59f 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -350,19 +350,6 @@ def load_settings(  # pylint: disable=too-many-locals,too-many-branches,too-many
                 LOG.debug("Loaded custom commands from '%s'", custom_comm_path)
             sys.dont_write_bytecode = old_bytecode_setting
 
-        allow_access_to_confdir(ranger.args.confdir, False)
-
-        # Load rc.conf
-        custom_conf = fm.confpath('rc.conf')
-        default_conf = fm.relpath('config', 'rc.conf')
-
-        if os.environ.get('RANGER_LOAD_DEFAULT_RC', 'TRUE').upper() != 'FALSE':
-            fm.source(default_conf)
-        if os.access(custom_conf, os.R_OK):
-            fm.source(custom_conf)
-
-        allow_access_to_confdir(ranger.args.confdir, True)
-
         # XXX Load plugins (experimental)
         plugindir = fm.confpath('plugins')
         try:
@@ -399,6 +386,15 @@ def load_settings(  # pylint: disable=too-many-locals,too-many-branches,too-many
             ranger.fm = None
 
         allow_access_to_confdir(ranger.args.confdir, False)
+        # Load rc.conf
+        custom_conf = fm.confpath('rc.conf')
+        default_conf = fm.relpath('config', 'rc.conf')
+
+        if os.environ.get('RANGER_LOAD_DEFAULT_RC', 'TRUE').upper() != 'FALSE':
+            fm.source(default_conf)
+        if os.access(custom_conf, os.R_OK):
+            fm.source(custom_conf)
+
     else:
         fm.source(fm.relpath('config', 'rc.conf'))