@@ -60,7 +60,7 @@ index 99bd930a91..319c4bd3c3 100644
6060 ];
6161
6262diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts
63- index fa12f62900..1dbaac1640 100644
63+ index fa12f62900..a4c72fee8e 100644
6464--- a/src/vs/base/browser/dom.ts
6565+++ b/src/vs/base/browser/dom.ts
6666@@ -1187,6 +1187,7 @@ export function animate(fn: () => void): IDisposable {
@@ -80,7 +80,7 @@ index fa12f62900..1dbaac1640 100644
8080 // rewrite vscode-remote-uris to uris of the window location
8181 // so that they can be intercepted by the service worker
8282- return _location.with({ path: '/vscode-resources/fetch', query: `u=${JSON.stringify(uri)}` });
83- + return _location.with({ path: `${basePath}/vscode-resources/${uri.fsPath }` });
83+ + return _location.with({ path: `${basePath}/vscode-resources/fetch`, query: `u=${JSON.stringify(uri) }` });
8484 }
8585 return uri;
8686 }
@@ -715,6 +715,33 @@ index 9235c739fb..32d203eb32 100644
715715 this._register(logService.onDidChangeLogLevel(level => logLevelClient.setLevel(level)));
716716 }
717717 }
718+ diff --git a/src/vs/workbench/contrib/resources/browser/resourceServiceWorker.ts b/src/vs/workbench/contrib/resources/browser/resourceServiceWorker.ts
719+ index 622bb7889b..66dd4b0bbc 100644
720+ --- a/src/vs/workbench/contrib/resources/browser/resourceServiceWorker.ts
721+ +++ b/src/vs/workbench/contrib/resources/browser/resourceServiceWorker.ts
722+ @@ -36,7 +36,8 @@ self.addEventListener('activate', event => {
723+ //#region --- fetching/caching
724+
725+ const _cacheName = 'vscode-resources';
726+ - const _resourcePrefix = '/vscode-resources/fetch';
727+ + const rootPath = self.location.pathname.replace(/\/out\/vs\/workbench\/contrib\/resources\/browser\/resourceServiceWorkerMain.js$/, '');
728+ + const _resourcePrefix = `${rootPath}/vscode-resources/fetch`;
729+ const _pendingFetch = new Map<string, Function>();
730+
731+ self.addEventListener('message', event => {
732+ diff --git a/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts b/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts
733+ index dfda6a1cfb..44a01fb0fb 100644
734+ --- a/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts
735+ +++ b/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts
736+ @@ -24,7 +24,7 @@ const _serviceWorker = new class ServiceWorkerStarter {
737+ private _messageHandler?: (event: ExtendableMessageEvent) => void;
738+
739+ constructor() {
740+ - navigator.serviceWorker.register(ServiceWorkerStarter._url, { scope: '/' }).then(reg => {
741+ + navigator.serviceWorker.register(ServiceWorkerStarter._url, { scope: window.location.pathname.replace(/\/+$/, '') }).then(reg => {
742+ // console.debug('SW#reg', reg);
743+ return reg.update();
744+ // }).then(() => {
718745diff --git a/src/vs/workbench/contrib/update/electron-browser/update.contribution.ts b/src/vs/workbench/contrib/update/electron-browser/update.contribution.ts
719746index e39fa57979..3c775c9a06 100644
720747--- a/src/vs/workbench/contrib/update/electron-browser/update.contribution.ts
0 commit comments