diff --git a/src/sql/workbench/contrib/notebook/browser/cellViews/linkHandler.directive.ts b/src/sql/workbench/contrib/notebook/browser/cellViews/linkHandler.directive.ts index 1825be105a..25c20166d5 100644 --- a/src/sql/workbench/contrib/notebook/browser/cellViews/linkHandler.directive.ts +++ b/src/sql/workbench/contrib/notebook/browser/cellViews/linkHandler.directive.ts @@ -65,14 +65,16 @@ export class LinkHandlerDirective { if (uri.fragment && uri.fragment.length > 0 && uri.fsPath === this.workbenchFilePath.fsPath) { this.notebookService.navigateTo(this.notebookUri, uri.fragment); } else { - let exists = await this.fileService.exists(uri); - if (!exists) { - let relPath = relative(this.workbenchFilePath.fsPath, uri.fsPath); - let path = resolve(this.notebookUri.fsPath, relPath); - try { - uri = URI.file(path); - } catch (error) { - onUnexpectedError(error); + if (uri.scheme === 'file') { + let exists = await this.fileService.exists(uri); + if (!exists) { + let relPath = relative(this.workbenchFilePath.fsPath, uri.fsPath); + let path = resolve(this.notebookUri.fsPath, relPath); + try { + uri = URI.file(path); + } catch (error) { + onUnexpectedError(error); + } } } if (this.forceOpenExternal(uri)) {