Faster search_accdb

This commit is contained in:
2023-05-02 00:08:59 +02:00
parent 8de8a88587
commit 2c4b4c278f

View File

@ -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)