summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/tab.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/ranger/core/tab.py b/ranger/core/tab.py
index 8ae74141..443b2037 100644
--- a/ranger/core/tab.py
+++ b/ranger/core/tab.py
@@ -61,20 +61,15 @@ class Tab(FileManagerAware, SettingsAware):
 			except IndexError:
 				return None
 		else:
-			directory = self.thisfile
-			for i in range(level - 1):
+			directory = self.thisdir
+			for i in range(level):
 				if directory is None:
 					return None
 				if directory.is_directory:
 					directory = directory.pointed_obj
 				else:
 					return None
-			try:
-				return self.fm.directories[directory.path]
-			except AttributeError:
-				return None
-			except KeyError:
-				return directory
+			return directory
 
 	def get_selection(self):
 		if self.thisdir: