Skip to content

Commit d5c9c1d

Browse files
committed
Resolve symlinks before computing git URLs
1 parent cedd490 commit d5c9c1d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/peakrdl_html/exporter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,9 @@ def get_view_source_info(self, node: Node) -> 'Tuple[Optional[str], Optional[str
477477
else:
478478
return None, None
479479

480+
# resolve any symlinks to ensure true git path
481+
path = os.path.realpath(path)
482+
480483
try:
481484
return (self.gmtu.get_source_url(path, line), os.path.basename(path))
482485
except Exception: # pylint: disable=broad-except

0 commit comments

Comments
 (0)