scan_directory: Catch exceptions due to relative path conversion (e.g. nul device file on Windows) #931

This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2026-01-13 11:33:19 +01:00
1 parent 2b50c360e2
commit d75b41b6ae
1 file changed
+5 -1
+5 -1
View File
@@ -52,7 +52,11 @@ def scan_directory(
entry_path = entry.path
if rel_base:
result_path = os.path.relpath(entry_path, rel_base)
try:
result_path = os.path.relpath(entry_path, rel_base)
except:
log.debug(f"Skipping entry due to relative path conversion error: {entry.path}")
continue
else:
result_path = entry_path