Handle /webview/vscode-resource/file urls

See #1103.
This commit is contained in:
Asher 2019-10-24 14:30:35 -05:00
parent e7945bea94
commit 95693fb58e
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -523,8 +523,8 @@ export class MainServer extends Server {
} }
break; break;
case "/webview": case "/webview":
if (requestPath.indexOf("/vscode-resource") === 0) { if (/^\/vscode-resource/.test(requestPath)) {
return this.getResource(requestPath.replace(/^\/vscode-resource/, "")); return this.getResource(requestPath.replace(/^\/vscode-resource(\/file)?/, ""));
} }
return this.getResource( return this.getResource(
this.rootPath, this.rootPath,