From 379e420577645bfe83746f1c6770d0b6e2152b2c Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 14 Apr 2011 15:37:12 +0200 Subject: [PATCH] Fixed exclusion bug during folders scan. --- core/directories.py | 3 ++- core_se/app_cocoa.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/directories.py b/core/directories.py index bfc3f429..a3950059 100644 --- a/core/directories.py +++ b/core/directories.py @@ -81,13 +81,14 @@ class Directories: pass def _get_folders(self, from_folder): - state = self.get_state(from_folder.path) try: for subfolder in from_folder.subfolders: for folder in self._get_folders(subfolder): yield folder + state = self.get_state(from_folder.path) if state != DirectoryState.Excluded: from_folder.is_ref = state == DirectoryState.Reference + logging.debug("Yielding Folder %r state: %d", from_folder, state) yield from_folder except (EnvironmentError, fs.InvalidPath): pass diff --git a/core_se/app_cocoa.py b/core_se/app_cocoa.py index 777094e7..ad8e721f 100644 --- a/core_se/app_cocoa.py +++ b/core_se/app_cocoa.py @@ -51,8 +51,9 @@ class Directories(DirectoriesBase): if is_bundle(str(from_folder.path)): # just yield the current folder and bail state = self.get_state(from_folder.path) - from_folder.is_ref = state == DirectoryState.Reference - yield from_folder + if state != DirectoryState.Excluded: + from_folder.is_ref = state == DirectoryState.Reference + yield from_folder return else: for folder in DirectoriesBase._get_folders(self, from_folder):