Skip to content

Commit

Permalink
Web Extension: Fix file opening for media files (#1094)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
priyanshu92 authored Jan 23, 2025
1 parent cd4fb6d commit 18b8286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/client/dal/fileSystemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ export class PortalsFS implements vscode.FileSystemProvider {
);

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

WebExtensionContext.telemetry.sendInfoTelemetry(
webExtensionTelemetryEventNames.WEB_EXTENSION_VSCODE_START_COMMAND,
Expand Down

0 comments on commit 18b8286

Please sign in to comment.