summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2019-02-13 19:45:51 +0100
committerGitHub <noreply@github.com>2019-02-13 19:45:51 +0100
commit29e51e1b702edf763d06327bf2e56f412e2565e8 (patch)
tree4e1a948578fb834b9b77e69df7bb5a9c8c046475
parent3963d9b8d56e39ff97b957ad58587bb562bdbe60 (diff)
parent94ca9a984740eaa46a342e8a7e4ad04e351e8138 (diff)
downloadranger-29e51e1b702edf763d06327bf2e56f412e2565e8.tar.gz
Merge pull request #1469 from Zaeph/rename-append-check-if-dir
rename_append: Use `rename` if point is on a directory
-rwxr-xr-xranger/config/commands.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index d177203a..fe628e75 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -996,7 +996,7 @@ class rename_append(Command):
         relpath = tfile.relative_path.replace(MACRO_DELIMITER, MACRO_DELIMITER_ESC)
         basename = tfile.basename.replace(MACRO_DELIMITER, MACRO_DELIMITER_ESC)
 
-        if basename.find('.') <= 0:
+        if basename.find('.') <= 0 or os.path.isdir(relpath):
             self.fm.open_console('rename ' + relpath)
             return