summary refs log tree commit diff stats
path: root/code/fsobject.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-11-24 16:50:20 +0100
committerhut <hut@lavabit.com>2009-11-24 16:50:20 +0100
commitf6f26231a1a2c886f43d9ec965eb7903180067fb (patch)
tree2340d5a6b5dfb97e447b90ab9e1f45a8d4bdffba /code/fsobject.py
parent798d06a2317a5bb4ee38cec4d1d4f5d428d75593 (diff)
downloadranger-f6f26231a1a2c886f43d9ec965eb7903180067fb.tar.gz
corrected test, added some stuff
Diffstat (limited to 'code/fsobject.py')
-rw-r--r--code/fsobject.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/code/fsobject.py b/code/fsobject.py
index 148976d2..6e93140f 100644
--- a/code/fsobject.py
+++ b/code/fsobject.py
@@ -36,7 +36,7 @@ class FSObject(object):
 
 			if os.path.isdir(self.path):
 				self.type = fstype.Directory
-				self.infostring = '--'
+				self.infostring = ' %d' % len(os.listdir(self.path))
 			elif os.path.isfile(self.path):
 				self.type = fstype.File
 				self.infostring = ' %d' % self.stat.st_size
@@ -60,17 +60,15 @@ class FSObject(object):
 
 	def load_if_outdated(self):
 		self.stop_if_frozen()
-		import os
-
 		if self.load_once(): return True
 
+		import os
 		real_mtime = os.stat(self.path).st_mtime
 		cached_mtime = self.stat.st_mtime
 
 		if real_mtime != cached_mtime:
 			self.load()
 			return True
-
 		return False
 
 	def clone(self):