summary refs log tree commit diff stats
path: root/ranger/config/commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/config/commands.py')
-rwxr-xr-xranger/config/commands.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 6fa5b904..aa955605 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -852,9 +852,11 @@ class rename_append(Command):
         self._flag_remove = 'r' in flags
 
     def execute(self):
+        from ranger import MACRO_DELIMITER, MACRO_DELIMITER_ESC
+
         tfile = self.fm.thisfile
-        relpath = tfile.relative_path.replace('%', '%%')
-        basename = tfile.basename.replace('%', '%%')
+        relpath = tfile.relative_path.replace(MACRO_DELIMITER, MACRO_DELIMITER_ESC)
+        basename = tfile.basename.replace(MACRO_DELIMITER, MACRO_DELIMITER_ESC)
 
         if basename.find('.') <= 0:
             self.fm.open_console('rename ' + relpath)