mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Check for file scheme in linkhandler (#10090)
This commit is contained in:
@@ -65,14 +65,16 @@ export class LinkHandlerDirective {
|
|||||||
if (uri.fragment && uri.fragment.length > 0 && uri.fsPath === this.workbenchFilePath.fsPath) {
|
if (uri.fragment && uri.fragment.length > 0 && uri.fsPath === this.workbenchFilePath.fsPath) {
|
||||||
this.notebookService.navigateTo(this.notebookUri, uri.fragment);
|
this.notebookService.navigateTo(this.notebookUri, uri.fragment);
|
||||||
} else {
|
} else {
|
||||||
let exists = await this.fileService.exists(uri);
|
if (uri.scheme === 'file') {
|
||||||
if (!exists) {
|
let exists = await this.fileService.exists(uri);
|
||||||
let relPath = relative(this.workbenchFilePath.fsPath, uri.fsPath);
|
if (!exists) {
|
||||||
let path = resolve(this.notebookUri.fsPath, relPath);
|
let relPath = relative(this.workbenchFilePath.fsPath, uri.fsPath);
|
||||||
try {
|
let path = resolve(this.notebookUri.fsPath, relPath);
|
||||||
uri = URI.file(path);
|
try {
|
||||||
} catch (error) {
|
uri = URI.file(path);
|
||||||
onUnexpectedError(error);
|
} catch (error) {
|
||||||
|
onUnexpectedError(error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.forceOpenExternal(uri)) {
|
if (this.forceOpenExternal(uri)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user