From 3cb12a21b5711022d304d8ea1252bbf620d6eb15 Mon Sep 17 00:00:00 2001 From: matt penrice Date: Fri, 29 May 2020 21:00:22 +0200 Subject: [PATCH] Create VsCodeResource for schemed filepaths (#94986) --- .../typescript-language-features/src/typescriptServiceClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript-language-features/src/typescriptServiceClient.ts b/extensions/typescript-language-features/src/typescriptServiceClient.ts index ab94aa6a00e..3af5d2da353 100644 --- a/extensions/typescript-language-features/src/typescriptServiceClient.ts +++ b/extensions/typescript-language-features/src/typescriptServiceClient.ts @@ -630,7 +630,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType } public toResource(filepath: string): vscode.Uri { - if (filepath.startsWith(TypeScriptServiceClient.WALK_THROUGH_SNIPPET_SCHEME_COLON) || (filepath.startsWith(fileSchemes.untitled + ':')) + if (filepath.match(/^[a-z]{2,}:/) || filepath.startsWith(TypeScriptServiceClient.WALK_THROUGH_SNIPPET_SCHEME_COLON) || (filepath.startsWith(fileSchemes.untitled + ':')) ) { let resource = vscode.Uri.parse(filepath); const dirName = path.dirname(resource.path); -- GitLab