From 8dc6194ecc0bd0876b4421c4be450b94c385e818 Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 18 Apr 2010 12:16:35 +0200 Subject: improved loading of infostrings no "lazy" loading anymore, its not worth it --- ranger/fsobject/directory.py | 7 +------ ranger/fsobject/fsobject.py | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py index 1c8355cd..af8ab232 100644 --- a/ranger/fsobject/directory.py +++ b/ranger/fsobject/directory.py @@ -201,11 +201,6 @@ class Directory(FileSystemObject, Accumulator, SettingsAware): self.filenames = filenames self.files = files - if self == self.fm.env.cwd: - for dir in self.files: - if dir.is_directory and dir.infostring == 'unknown': - dir.determine_infostring() - self._clear_marked_items() for item in self.files: if item.path in marked_paths: @@ -224,9 +219,9 @@ class Directory(FileSystemObject, Accumulator, SettingsAware): self.filenames = None self.files = None - self.determine_infostring() self.cycle_list = None self.content_loaded = True + self.determine_infostring() self.last_update_time = time() finally: diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py index 3f272bb2..b954d87f 100644 --- a/ranger/fsobject/fsobject.py +++ b/ranger/fsobject/fsobject.py @@ -186,7 +186,6 @@ class FileSystemObject(MimeTypeAware, FileManagerAware): """ self.loaded = True - try: self.stat = os.lstat(self.path) except OSError: @@ -213,6 +212,7 @@ class FileSystemObject(MimeTypeAware, FileManagerAware): self.accessible = True if os.path.isdir(self.path): self.type = T_DIRECTORY + self.runnable = bool(mode & stat.S_IXUSR) elif os.path.isfile(self.path): self.type = T_FILE else: -- cgit 1.4.1-2-gfad0