Normalize paths when matching problems#77875
Conversation
| if (fullPath[0] !== '/') { | ||
| fullPath = '/' + fullPath; | ||
| } | ||
| fullPath = normalize(fullPath); |
There was a problem hiding this comment.
I'm a beginner on vscode's code, could you explain to me how does this line avoids this:
Actual: A new editor is opened containing the relative part of the path. The file history contains a new entry. When using "Go to file", both file locations are offered.
?
There was a problem hiding this comment.
Without this change, two editors will be opened. One for /Users/foo/dev/project/main.cpp and one for /Users/foo/dev/project/output/../main.cpp, even though it refers to the same file. By normalizing it upfront, the seconds path will be identical to the first one.
Ideally, vscode normalizes the paths before opening an editor but that sounded like a bigger change to me.
alexr00
left a comment
There was a problem hiding this comment.
Nice bug, thank you for the fix!
Fixes #77804