summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/fsobject/fsobject.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py
index 4ebec3bc..3f272bb2 100644
--- a/ranger/fsobject/fsobject.py
+++ b/ranger/fsobject/fsobject.py
@@ -157,14 +157,13 @@ class FileSystemObject(MimeTypeAware, FileManagerAware):
 		self.marked = bool(boolean)
 
 	def determine_infostring(self):
+		self.size = 0
 		if self.is_device:
 			self.infostring = 'dev'
 		elif self.is_fifo:
 			self.infostring = 'fifo'
 		elif self.is_socket:
 			self.infostring = 'sock'
-		elif self.is_link:
-			self.infostring = '->'
 		elif self.is_directory:
 			try:
 				self.size = len(os.listdir(self.path))
@@ -172,12 +171,13 @@ class FileSystemObject(MimeTypeAware, FileManagerAware):
 				self.accessible = True
 				self.runnable = True
 			except OSError:
-				self.size = 0
 				self.infostring = BAD_INFO
 				self.accessible = False
 		elif self.is_file:
 			self.size = self.stat.st_size
 			self.infostring = ' ' + human_readable(self.size)
+		if self.is_link:
+			self.infostring = '->'
 
 	def load(self):
 		"""