about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorLeo Vivier <zaephon@gmail.com>2019-02-13 19:16:53 +0100
committerLeo Vivier <zaephon@gmail.com>2019-02-13 19:16:53 +0100
commit94ca9a984740eaa46a342e8a7e4ad04e351e8138 (patch)
tree4e1a948578fb834b9b77e69df7bb5a9c8c046475
parentbd7361adbade8a532fbb12b9b4333a77c8c67453 (diff)
downloadranger-94ca9a984740eaa46a342e8a7e4ad04e351e8138.tar.gz
Merge conditions with an ‘or’
-rwxr-xr-xranger/config/commands.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 93da7fe2..fe628e75 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -996,11 +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:
-            self.fm.open_console('rename ' + relpath)
-            return
-
-        if os.path.isdir(relpath):
+        if basename.find('.') <= 0 or os.path.isdir(relpath):
             self.fm.open_console('rename ' + relpath)
             return