From 2c4b4c278f89540e3636d0ea7b81114ade736210 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Tue, 2 May 2023 00:08:59 +0200 Subject: [PATCH] Faster search_accdb --- wgmaster/export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgmaster/export.py b/wgmaster/export.py index 9c7929f..1f3ca13 100644 --- a/wgmaster/export.py +++ b/wgmaster/export.py @@ -38,7 +38,7 @@ def search_accdb(base_path: str = None) -> Generator[str, None, None]: path = f'{base_path}\\{entry.name}' if entry.name in IGNORED_NAMES: continue - elif entry.is_file() and entry.name.lower().endswith('.accdb'): + elif entry.name.lower().endswith('.accdb') and entry.is_file(): yield path elif len(entries) <= 50 and entry.is_dir() and not entry.is_symlink(): yield from search_accdb(path)