summary refs log tree commit diff stats
path: root/ranger/fsobject.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/fsobject.py')
-rw-r--r--ranger/fsobject.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/fsobject.py b/ranger/fsobject.py
index 099d3c5c..91c73bfc 100644
--- a/ranger/fsobject.py
+++ b/ranger/fsobject.py
@@ -43,7 +43,8 @@ class FSObject(object):
 			if os.path.isdir(self.path):
 				self.type = ranger.fstype.Directory
 				try:
-					self.infostring = ' %d' % len(os.listdir(self.path))
+					self.size = len(os.listdir(self.path))
+					self.infostring = ' %d' % self.size
 					self.runnable = True
 				except OSError:
 					self.infostring = FSObject.BAD_INFO
@@ -51,6 +52,7 @@ class FSObject(object):
 					self.accessible = False
 			elif os.path.isfile(self.path):
 				self.type = ranger.fstype.File
+				self.size = self.stat.st_size
 				self.infostring = ' %d' % self.stat.st_size
 			else:
 				self.type = ranger.fstype.Unknown