Fix to 'Markdown Preview of relative links drops 'host' from path' (#95092)

* Fix #93691

* Fix #93961
This commit is contained in:
Thomas Weingartner
2020-04-13 23:43:00 +02:00
committed by GitHub
parent 061f4967f9
commit b5136c0c79

View File

@@ -393,7 +393,8 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
// We perviously already resolve absolute paths.
// Now make sure we handle relative file paths
if (hrefPath[0] !== '/') {
hrefPath = path.join(path.dirname(this.resource.path), hrefPath);
// Fix #93691, use this.resource.fsPath instead of this.resource.path
hrefPath = path.join(path.dirname(this.resource.fsPath), hrefPath);
}
const config = vscode.workspace.getConfiguration('markdown', this.resource);