mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Make sure we normalize paths before sending them to tsserver
Fixes #84826
This commit is contained in:
@@ -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'), '/');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user