summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/widgets/statusbar.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py
index db415129..52425943 100644
--- a/ranger/gui/widgets/statusbar.py
+++ b/ranger/gui/widgets/statusbar.py
@@ -145,15 +145,18 @@ class StatusBar(Widget):
 			target = self.column.target.pointed_obj
 		else:
 			target = self.env.at_level(0).pointed_obj
-		if target is None or not target.accessible:
+		try:
+			stat = target.stat
+		except:
+			return
+		if stat is None:
 			return
 
 		perms = target.get_permission_string()
-		how = getuid() == target.stat.st_uid and 'good' or 'bad'
+		how = getuid() == stat.st_uid and 'good' or 'bad'
 		left.add(perms, 'permissions', how)
-
 		left.add_space()
-		left.add(str(target.stat.st_nlink), 'nlink')
+		left.add(str(stat.st_nlink), 'nlink')
 		left.add_space()
 		left.add(self._get_owner(target), 'owner')
 		left.add_space()
@@ -169,7 +172,7 @@ class StatusBar(Widget):
 			left.add_space()
 
 			left.add(strftime(self.timeformat,
-					localtime(target.stat.st_mtime)), 'mtime')
+					localtime(stat.st_mtime)), 'mtime')
 
 	def _get_owner(self, target):
 		uid = target.stat.st_uid