Skip to content

Commit 18b8286

Browse files
authored
Web Extension: Fix file opening for media files (#1094)
Using `vscode.open` API to open the default file instead of `window.showTextDocument` because `showTextDocument` doesn't open binary files to it was failing to open non-text files.
1 parent cd4fb6d commit 18b8286

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/web/client/dal/fileSystemProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ export class PortalsFS implements vscode.FileSystemProvider {
619619
);
620620

621621
// Fire and forget
622-
vscode.window.showTextDocument(WebExtensionContext.defaultFileUri, { preview: false, preserveFocus: true, viewColumn: vscode.ViewColumn.Active });
622+
vscode.commands.executeCommand('vscode.open', WebExtensionContext.defaultFileUri, { preview: false, preserveFocus: true, viewColumn: vscode.ViewColumn.Active });
623623

624624
WebExtensionContext.telemetry.sendInfoTelemetry(
625625
webExtensionTelemetryEventNames.WEB_EXTENSION_VSCODE_START_COMMAND,

0 commit comments

Comments
 (0)