Skip to content

Commit

Permalink
Ensure that showOpenDialog returns correct file URI (#13208)
Browse files Browse the repository at this point in the history
Use `URI.file` instead of manually reconstructing the URI from the received file path in plugin ext.
This ensures that directories or files that contain a hash are not wrongly added to the fragment component of the URI and aligns it with the expected behavior of VS Code.

Fixes #13074

Contributed on behalf of ST Microelectronics
  • Loading branch information
tortmayr authored Feb 29, 2024
1 parent 29c6b67 commit 8b00354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-ext/src/plugin/dialogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class DialogsExtImpl {
if (result) {
const uris = [];
for (let i = 0; i < result.length; i++) {
const uri = URI.parse('file://' + result[i]);
const uri = URI.file(result[i]);
uris.push(uri);
}
resolve(uris);
Expand Down

0 comments on commit 8b00354

Please sign in to comment.