From 096fd48b21ad1c9c5657bbec9d2a26ea55d22c62 Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 16 Feb 2013 20:07:12 +0100 Subject: config/commands: cleaner implementation of travel.execute() --- ranger/config/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ranger/config/commands.py b/ranger/config/commands.py index 9a42f66d..372aeccb 100644 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -1115,11 +1115,11 @@ class travel(narrow, Command): """ def execute(self): - thisfile = self.fm.thisfile + thisdir = self.fm.thisdir narrow.execute(self) # reopen the console: - if thisfile and thisfile.is_directory or self.rest(1) == "..": + if thisdir != self.fm.thisdir: self.fm.open_console(self.__class__.__name__ + " ") if self.rest(1) != "..": self.fm.block_input(0.5) -- cgit 1.4.1-2-gfad0