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
1 changed files with 2 additions and 2 deletions

View File

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