@@ -60,7 +60,7 @@ index 99bd930a91..319c4bd3c3 100644
60
60
];
61
61
62
62
diff --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
64
64
--- a/src/vs/base/browser/dom.ts
65
65
+++ b/src/vs/base/browser/dom.ts
66
66
@@ -1187,6 +1187,7 @@ export function animate(fn: () => void): IDisposable {
@@ -80,7 +80,7 @@ index fa12f62900..1dbaac1640 100644
80
80
// rewrite vscode-remote-uris to uris of the window location
81
81
// so that they can be intercepted by the service worker
82
82
- 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) }` });
84
84
}
85
85
return uri;
86
86
}
@@ -715,6 +715,33 @@ index 9235c739fb..32d203eb32 100644
715
715
this._register(logService.onDidChangeLogLevel(level => logLevelClient.setLevel(level)));
716
716
}
717
717
}
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(() => {
718
745
diff --git a/src/vs/workbench/contrib/update/electron-browser/update.contribution.ts b/src/vs/workbench/contrib/update/electron-browser/update.contribution.ts
719
746
index e39fa57979..3c775c9a06 100644
720
747
--- a/src/vs/workbench/contrib/update/electron-browser/update.contribution.ts
0 commit comments