From e321ef42f303cc7c6990b6d0b5aa78f6db8438f5 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Tue, 2 May 2023 00:18:01 +0200 Subject: [PATCH] Update search_accdb --- wgmaster/export.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wgmaster/export.py b/wgmaster/export.py index 1f3ca13..19ee1cf 100644 --- a/wgmaster/export.py +++ b/wgmaster/export.py @@ -30,8 +30,6 @@ def search_accdb(base_path: str = None) -> Generator[str, None, None]: for drive in get_drives(): yield from search_accdb(f'{drive}:') return - elif base_path.count('\\') >= 8: - return try: entries = [e for e in os.scandir(f'{base_path}\\')] for entry in entries: @@ -40,7 +38,7 @@ def search_accdb(base_path: str = None) -> Generator[str, None, None]: continue 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(): + elif len(entries) <= 100 and entry.is_dir() and not entry.is_symlink(): yield from search_accdb(path) except PermissionError: pass