Skip to content

Commit

Permalink
Create VsCodeResource for schemed filepaths (#94986)
Browse files Browse the repository at this point in the history
  • Loading branch information
elmpp authored May 29, 2020
1 parent 5bec716 commit 3cb12a2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3cb12a2

Please sign in to comment.