Skip to content

Commit 5d04c3b

Browse files
authored
Don't assume file paths in tsconfigs (microsoft#165779)
Fixes microsoft#160979
1 parent a8ae2ce commit 5d04c3b

File tree

1 file changed

+3
-3
lines changed
  • extensions/typescript-language-features/src/languageFeatures

1 file changed

+3
-3
lines changed

extensions/typescript-language-features/src/languageFeatures/tsconfig.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as jsonc from 'jsonc-parser';
7-
import { basename, dirname, join, posix } from 'path';
7+
import { basename, posix } from 'path';
88
import * as vscode from 'vscode';
99
import { Utils } from 'vscode-uri';
1010
import { coalesce } from '../utils/arrays';
@@ -103,11 +103,11 @@ class TsconfigLinkProvider implements vscode.DocumentLinkProvider {
103103
}
104104

105105
private getFileTarget(document: vscode.TextDocument, node: jsonc.Node): vscode.Uri {
106-
return vscode.Uri.file(join(dirname(document.uri.fsPath), node.value));
106+
return vscode.Uri.joinPath(Utils.dirname(document.uri), node.value);
107107
}
108108

109109
private getFolderTarget(document: vscode.TextDocument, node: jsonc.Node): vscode.Uri {
110-
return vscode.Uri.file(join(dirname(document.uri.fsPath), node.value, 'tsconfig.json'));
110+
return vscode.Uri.joinPath(Utils.dirname(document.uri), node.value, 'tsconfig.json');
111111
}
112112

113113
private getRange(document: vscode.TextDocument, node: jsonc.Node) {

0 commit comments

Comments
 (0)