summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/actions.py3
-rw-r--r--ranger/core/fm.py8
2 files changed, 5 insertions, 6 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 2d5f2da0..23f58173 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -272,7 +272,8 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
         macros = {}
 
         macros['rangerdir'] = ranger.RANGERDIR
-        macros['confdir'] = self.fm.confpath()
+        if not ranger.args.clean:
+            macros['confdir'] = self.fm.confpath()
         macros['space'] = ' '
 
         if self.fm.thisfile:
diff --git a/ranger/core/fm.py b/ranger/core/fm.py
index f524bbc4..7ad2cbdf 100644
--- a/ranger/core/fm.py
+++ b/ranger/core/fm.py
@@ -298,11 +298,9 @@ class FM(Actions,  # pylint: disable=too-many-instance-attributes
 
     @staticmethod
     def confpath(*paths):
-        """returns the path relative to rangers configuration directory"""
-        if ranger.args.clean:
-            assert 0, "Should not access relpath_conf in clean mode!"
-        else:
-            return os.path.join(ranger.args.confdir, *paths)
+        """returns path to ranger's configuration directory"""
+        assert not ranger.args.clean, "Accessed configuration directory in clean mode"
+        return os.path.join(ranger.args.confdir, *paths)
 
     @staticmethod
     def relpath(*paths):
#n133'>133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204