vscode-rust icon indicating copy to clipboard operation
vscode-rust copied to clipboard

Fix URI creation from path

Open aeschli opened this issue 5 years ago • 0 comments

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 https://github.com/Microsoft/vscode/issues/57267 for more information or for questions.

aeschli avatar Aug 27 '18 18:08 aeschli