Skip to content

Commit 3e25597

Browse files
committed
get the scheme and authority from the workspace folder
1 parent e5fccda commit 3e25597

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,15 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Themable {
982982
}
983983

984984
if (href.startsWith('/')) {
985-
linkToOpen = await this.pathService.fileURI(href);
985+
const folders = this.workspaceContextService.getWorkspace().folders;
986+
if (folders.length) {
987+
linkToOpen = (await this.pathService.fileURI(href)).with({
988+
scheme: folders[0].uri.scheme,
989+
authority: folders[0].uri.scheme
990+
});
991+
} else {
992+
linkToOpen = await this.pathService.fileURI(href);
993+
}
986994
} else if (href.startsWith('~')) {
987995
const userHome = await this.pathService.userHome();
988996
if (userHome) {

0 commit comments

Comments
 (0)