aboutsummaryrefslogtreecommitdiffstats
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):