vscode-rust
vscode-rust copied to clipboard
Fix URI creation from path
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.