-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix joinPath() issue on URIs (#10370) #10434
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution 👍
In order to accept your changes please be sure to sure to sign the eclipse contributor agreement (eca) with the same email as your authorship.
Edit: Looks like it was done :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yannickowow do you mind squashing the pull-request so there is only the single commit (removing the merge commit as well)?
- Use `posix.join` instead of `resolve` - Inconsistency between `joinPath` naming convention - Use POSIX separator to store path - Resolve to windows path when using fsPath - Added test suite accordingly Signed-off by: Yanis HAMITI <[email protected]>
Done ! |
@tsmaeder, @RomanNikitenko, does either of you have time to look at this? |
@msujew, since you've been working with path issues and since you have a Windows environment, would you be willing to test this out? I believe it should also address #10585. I've created a reproduction of that issue on this branch of the sample extensions repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the example created by @colin-grant-work, I was able to reproduce the issue.
Opening the webview with the change in place correctly loads the webview icon, so I think this addresses both #10370 and #10585.
What it does
Fixes #10370
Fixes #10585
Issues encountered are when calling
joinPath
on Windows.For consistency,
joinPath
callspaths.posix.join
instead.URI then will store all paths with POSIX-like path, and will resolve to filesystem path when calling fsPath.
How to test
Tests are added in
types-impl.spec.ts
(based on VS Code ones, with no modification). It should work as is.Review checklist