Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Fix URI creation from path #385

Open
aeschli opened this issue Aug 27, 2018 · 0 comments
Open

Fix URI creation from path #385

aeschli opened this issue Aug 27, 2018 · 0 comments

Comments

@aeschli
Copy link

aeschli commented Aug 27, 2018

In 1.26 we discovered that several extensions probably call the 'vscode.openFolder' command with invalid file URIs:

kalitaalexey.vscode-rust/out/src/components/cargo/cargo_manager.js
  `373,53:                     vscode.commands.executeCommand('vscode.openFolder', uri, true);`
kalitaalexey.vscode-rust/out/src/components/cargo/CargoManager.js
  `192,55:                     vscode_1.commands.executeCommand('vscode.openFolder', uri, true);`

When creating a URI from a file path, always use vscode.URI.file(path), e.g vscode.URI.file('c:\\test')
Use vscode.URI.parse(uriString) when the input string is in the form scheme://authority/path

See microsoft/vscode#57267 for more information or for questions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant