Make sure we normalize paths before sending them to tsserver
Fixes #84826
This commit is contained in:
parent
ab05d79769
commit
a63d88ec55
1 changed files with 5 additions and 1 deletions
|
@ -575,11 +575,15 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
|||
return undefined;
|
||||
}
|
||||
|
||||
const result = resource.fsPath;
|
||||
let result = resource.fsPath;
|
||||
if (!result) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (resource.scheme === fileSchemes.file) {
|
||||
result = path.normalize(result);
|
||||
}
|
||||
|
||||
// Both \ and / must be escaped in regular expressions
|
||||
return result.replace(new RegExp('\\' + this.pathSeparator, 'g'), '/');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue