Faster search_accdb
This commit is contained in:
@ -38,7 +38,7 @@ def search_accdb(base_path: str = None) -> Generator[str, None, None]:
|
|||||||
path = f'{base_path}\\{entry.name}'
|
path = f'{base_path}\\{entry.name}'
|
||||||
if entry.name in IGNORED_NAMES:
|
if entry.name in IGNORED_NAMES:
|
||||||
continue
|
continue
|
||||||
elif entry.is_file() and entry.name.lower().endswith('.accdb'):
|
elif entry.name.lower().endswith('.accdb') and entry.is_file():
|
||||||
yield path
|
yield path
|
||||||
elif len(entries) <= 50 and entry.is_dir() and not entry.is_symlink():
|
elif len(entries) <= 50 and entry.is_dir() and not entry.is_symlink():
|
||||||
yield from search_accdb(path)
|
yield from search_accdb(path)
|
||||||
|
Reference in New Issue
Block a user