summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-18 10:22:13 +0200
committerhut <hut@lavabit.com>2010-04-18 10:22:13 +0200
commitab573ea980a46d91e1da9347a1d7b90e7daddcda (patch)
tree5f664421de01a471c959867a403d979f63e2ea4c
parent7213292e490a4f6c73a915d2ea6b834c005dd424 (diff)
downloadranger-ab573ea980a46d91e1da9347a1d7b90e7daddcda.tar.gz
fsobject: Don't consider linked directories empty
-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):
 		"""