Update search_accdb
This commit is contained in:
		@@ -30,8 +30,6 @@ def search_accdb(base_path: str = None) -> Generator[str, None, None]:
 | 
				
			|||||||
        for drive in get_drives():
 | 
					        for drive in get_drives():
 | 
				
			||||||
            yield from search_accdb(f'{drive}:')
 | 
					            yield from search_accdb(f'{drive}:')
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
    elif base_path.count('\\') >= 8:
 | 
					 | 
				
			||||||
        return
 | 
					 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        entries = [e for e in os.scandir(f'{base_path}\\')]
 | 
					        entries = [e for e in os.scandir(f'{base_path}\\')]
 | 
				
			||||||
        for entry in entries:
 | 
					        for entry in entries:
 | 
				
			||||||
@@ -40,7 +38,7 @@ def search_accdb(base_path: str = None) -> Generator[str, None, None]:
 | 
				
			|||||||
                continue
 | 
					                continue
 | 
				
			||||||
            elif entry.name.lower().endswith('.accdb') and entry.is_file():
 | 
					            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) <= 100 and entry.is_dir() and not entry.is_symlink():
 | 
				
			||||||
                yield from search_accdb(path)
 | 
					                yield from search_accdb(path)
 | 
				
			||||||
    except PermissionError:
 | 
					    except PermissionError:
 | 
				
			||||||
        pass
 | 
					        pass
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user