diff --git a/src/serena/util/file_system.py b/src/serena/util/file_system.py index 784fc2cf..3784a17a 100644 --- a/src/serena/util/file_system.py +++ b/src/serena/util/file_system.py @@ -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