提交 a63d88ec 编写于 作者: M Matt Bierner

Make sure we normalize paths before sending them to tsserver

Fixes #84826
上级 ab05d797
......@@ -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'), '/');
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册