mirror of
https://github.com/arsenetar/dupeguru.git
synced 2024-11-04 15:29:02 +00:00
Fixed exclusion bug during folders scan.
This commit is contained in:
parent
0b20b35ffb
commit
379e420577
@ -81,13 +81,14 @@ class Directories:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def _get_folders(self, from_folder):
|
def _get_folders(self, from_folder):
|
||||||
state = self.get_state(from_folder.path)
|
|
||||||
try:
|
try:
|
||||||
for subfolder in from_folder.subfolders:
|
for subfolder in from_folder.subfolders:
|
||||||
for folder in self._get_folders(subfolder):
|
for folder in self._get_folders(subfolder):
|
||||||
yield folder
|
yield folder
|
||||||
|
state = self.get_state(from_folder.path)
|
||||||
if state != DirectoryState.Excluded:
|
if state != DirectoryState.Excluded:
|
||||||
from_folder.is_ref = state == DirectoryState.Reference
|
from_folder.is_ref = state == DirectoryState.Reference
|
||||||
|
logging.debug("Yielding Folder %r state: %d", from_folder, state)
|
||||||
yield from_folder
|
yield from_folder
|
||||||
except (EnvironmentError, fs.InvalidPath):
|
except (EnvironmentError, fs.InvalidPath):
|
||||||
pass
|
pass
|
||||||
|
@ -51,6 +51,7 @@ class Directories(DirectoriesBase):
|
|||||||
if is_bundle(str(from_folder.path)):
|
if is_bundle(str(from_folder.path)):
|
||||||
# just yield the current folder and bail
|
# just yield the current folder and bail
|
||||||
state = self.get_state(from_folder.path)
|
state = self.get_state(from_folder.path)
|
||||||
|
if state != DirectoryState.Excluded:
|
||||||
from_folder.is_ref = state == DirectoryState.Reference
|
from_folder.is_ref = state == DirectoryState.Reference
|
||||||
yield from_folder
|
yield from_folder
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user