-
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
Incorrect usage of URI#path.toString()
on Windows
#10830
Comments
@msujew what's the problem with calling uri.path.toString()? Can you give an example that shows the problem? |
Also, doing a workspace find for ".path.toString()" reveals many more occurrences than the above. How did you come about the list above? |
@tsmaeder, calling const uri = new URI("file://c:\\path\\to\\file");
uri.path.toString(); // yields "/c:/path/to/file Although
Not all const path = uri.path.toString();
... // somewhere later
const uriPath = new URI(path); Which is fine, but once we start interaction with the file system or displaying these paths to the user, we need to convert them to the correct OS presentation. |
Description
This issue is meant to collect incorrect usages of displaying URI strings on Windows systems. Simply calling
URI#path.toString()
usually results in incorrectly formatted paths. See #10591. See also the following as an example:Additional Information
The text was updated successfully, but these errors were encountered: