about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorLeo Vivier <zaephon@gmail.com>2019-02-10 15:55:58 +0100
committerLeo Vivier <zaephon@gmail.com>2019-02-10 16:08:18 +0100
commitbd7361adbade8a532fbb12b9b4333a77c8c67453 (patch)
tree7ad3085dd312b0e18d20a26414954a34d842e0c3
parent3963d9b8d56e39ff97b957ad58587bb562bdbe60 (diff)
downloadranger-bd7361adbade8a532fbb12b9b4333a77c8c67453.tar.gz
rename_append: Use `rename` if point is on a directory
When the directory at point has full-stops in it, rename_append would
put the point at the last period in the dir-name, as it would with a
file.
-rwxr-xr-xranger/config/commands.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index d177203a..93da7fe2 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -1000,6 +1000,10 @@ class rename_append(Command):
             self.fm.open_console('rename ' + relpath)
             return
 
+        if os.path.isdir(relpath):
+            self.fm.open_console('rename ' + relpath)
+            return
+
         if self._flag_ext_all:
             pos_ext = re.search(r'[^.]+', basename).end(0)
         else: