microsoft / sarif-visualstudio-extension

SARIF Microsoft Visual Studio Viewer Extension
MIT License
46 stars 19 forks source link

Fix an issue cannot navigate to the source file #552

Closed yongyan-gh closed 2 years ago

yongyan-gh commented 2 years ago

Description

When the user launches Visual Studio using command line at the repo's root directory, to open the folder view in VS. E.g. C:\repos\devcanvas\devenv.exe .

The current working directory is set to the repo's root directory. The File.Exists() check for a relative path under this directory now returns true. E.g. File.Exists("client/Console/InsightConsole/FileFetcher.cs") is false if current working directory is not the repo root, but its true if current working directory is set to repo root.

Fix the issue in the code assumes File.Exists() return true only for the full file path.

Fix for #453