File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ Status of the `main` branch. Changes prior to the next official version change w
55* General:
66 - Support environment variable ` SERENA_USAGE_REPORTING ` (set to ` false ` to disable usage reporting)
77 - Extended the list of always ignored directories (by language servers) with common cases.
8+ - Fix: When scanning for ` .gitignore ` files, the presence of files that could not be made relative
9+ to the project root would cause the scan to fail. #1317
810
911JetBrains:
1012 - Improve handling of ` relative_path ` parameter
Original file line number Diff line number Diff line change @@ -177,7 +177,11 @@ def scan(abs_path: str | None) -> Iterator[str]:
177177 while queue :
178178 next_abs_path = queue .pop (0 )
179179 if next_abs_path != self .repo_root :
180- rel_path = os .path .relpath (next_abs_path , self .repo_root )
180+ try :
181+ rel_path = os .path .relpath (next_abs_path , self .repo_root )
182+ except ValueError :
183+ # If the path is on a different drive (Windows) or cannot be made relative for another reason, we ignore it
184+ continue
181185 if self .should_ignore (rel_path ):
182186 continue
183187 yield from scan (next_abs_path )
You can’t perform that action at this time.
0 commit comments