mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 12:15:10 +00:00
scan_directory: Catch exceptions due to relative path conversion (e.g. nul device file on Windows) #931
This commit is contained in:
1 parent
2b50c360e2
commit
d75b41b6ae
1 file changed
+5
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user