summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorToon Nolten <toon.nolten@student.kuleuven.be>2018-08-20 22:56:06 +0200
committerToon Nolten <toon.nolten@student.kuleuven.be>2018-08-20 22:56:06 +0200
commit8d4808fc6a0f36960ff9999b99e9030d93286e41 (patch)
tree54ae978e394f0a35969d91b6ac76890c77f26236
parent8799e4a6a1909053a2207ae774b1fe3a5384f2d1 (diff)
parenta3c8c7890014a79689566737418cb111185907ac (diff)
downloadranger-8d4808fc6a0f36960ff9999b99e9030d93286e41.tar.gz
Merge branch 'rangerpath'
-rw-r--r--ranger/core/actions.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 86927a6e..83cfcc08 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -490,13 +490,12 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
                 mode = narg
             tfile = self.thisfile
             selection = self.thistab.get_selection()
-            if selection:
-                if selection.is_directory:
-                    self.thistab.enter_dir(tfile)
-                else:
-                    result = self.execute_file(selection, mode=mode)
-                    if result in (False, ASK_COMMAND):
-                        self.open_console('open_with ')
+            if tfile.is_directory:
+                self.thistab.enter_dir(tfile)
+            elif selection:
+                result = self.execute_file(selection, mode=mode)
+                if result in (False, ASK_COMMAND):
+                    self.open_console('open_with ')
         elif direction.vertical() and cwd.files:
             pos_new = direction.move(
                 direction=direction.down(),