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

Fix absolute paths in markdown preview on windows

Fixes #84728

We should use `.fsPath` for both parts of the uri in this case.
上级 eae6eca8
......@@ -242,8 +242,11 @@ export class MarkdownEngine {
if (uri.path[0] === '/') {
const root = vscode.workspace.getWorkspaceFolder(this.currentDocument!);
if (root) {
uri = uri.with({
path: path.join(root.uri.fsPath, uri.path),
const fileUri = vscode.Uri.file(path.join(root.uri.fsPath, uri.fsPath));
uri = fileUri.with({
scheme: uri.scheme,
fragment: uri.fragment,
query: uri.query,
});
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册