summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-09 22:48:23 +0200
committerhut <hut@lavabit.com>2011-10-09 22:48:23 +0200
commit0dbd3faa556ce5c2cb38cc6937fb0c8f98d3656b (patch)
treeb84b60bc7cd594ba45bbd25a9d29ed5e7bbd54b0 /ranger
parent376dfe2bb4dac316814c654ec55a3ad6ed3eff1f (diff)
downloadranger-0dbd3faa556ce5c2cb38cc6937fb0c8f98d3656b.tar.gz
fsobject.directory: Update dir size when content changes
Diffstat (limited to 'ranger')
-rw-r--r--ranger/fsobject/directory.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index f5803032..6b4a66f1 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -187,8 +187,11 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware):
 
 				hidden_filter = not self.settings.show_hidden \
 						and self.settings.hidden_filter
+				filelist = os.listdir(mypath)
+				self.size = len(filelist)
+				self.infostring = ' %d' % self.size
 				filenames = [mypath + (mypath == '/' and fname or '/' + fname)\
-						for fname in os.listdir(mypath) if accept_file(
+						for fname in filelist if accept_file(
 							fname, mypath, hidden_filter, self.filter)]
 				yield
 
' href='#n141'>141 142 143 144