diff options
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r-- | ranger/core/actions.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 5364f391..3300a534 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -344,8 +344,12 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): def select_file(self, path): path = path.strip() - if self.enter_dir(os.path.dirname(path)): - self.env.cwd.move_to_obj(path) + dirname = os.path.dirname(path) + if dirname: + if self.enter_dir(dirname): + self.env.cwd.move_to_obj(path) + else: + self.env.cwd.move_to_obj(join(self.env.cwd.path, path)) def history_go(self, relative): """Move back and forth in the history""" |