Fix accessing versioned resource using file service

Fixes #986.
This commit is contained in:
Asher
2019-09-16 10:59:28 -05:00
parent 0141ded35d
commit 5c16399810
2 changed files with 3 additions and 3 deletions

View File

@@ -164,8 +164,8 @@ export class FileProviderChannel implements IServerChannel, IDisposable {
private transform(resource: UriComponents): URI {
// Used for walkthrough content.
if (resource.path.indexOf("/static") === 0) {
return URI.file(this.environmentService.appRoot + resource.path.replace(/^\/static/, ""));
if (/^\/static[^/]*\//.test(resource.path)) {
return URI.file(this.environmentService.appRoot + resource.path.replace(/^\/static[^/]*\//, "/"));
// Used by the webview service worker to load resources.
} else if (resource.path === "/vscode-resource" && resource.query) {
try {