diff options
author | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2019-02-13 19:45:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-13 19:45:51 +0100 |
commit | 29e51e1b702edf763d06327bf2e56f412e2565e8 (patch) | |
tree | 4e1a948578fb834b9b77e69df7bb5a9c8c046475 | |
parent | 3963d9b8d56e39ff97b957ad58587bb562bdbe60 (diff) | |
parent | 94ca9a984740eaa46a342e8a7e4ad04e351e8138 (diff) | |
download | ranger-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-x | ranger/config/commands.py | 2 |
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 |