Skip to content

Commit 3f3d17e

Browse files
authored
Merge pull request #96873 from microsoft/sandy081/web/fixSyncState
Sync state should be scoped per workspace in Web
2 parents 052c389 + c287385 commit 3f3d17e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vs/workbench/services/environment/browser/environmentService.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,13 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
114114
@memoize
115115
get snippetsHome(): URI { return joinPath(this.userRoamingDataHome, 'snippets'); }
116116

117+
/*
118+
* In Web every workspace can potentially have scoped user-data and/or extensions and if Sync state is shared then it can make
119+
* Sync error prone - say removing extensions from another workspace. Hence scope Sync state per workspace.
120+
* Sync scoped to a workspace is capable of handling opening same workspace in multiple windows.
121+
*/
117122
@memoize
118-
get userDataSyncHome(): URI { return joinPath(this.userRoamingDataHome, 'sync'); }
123+
get userDataSyncHome(): URI { return joinPath(this.userRoamingDataHome, 'sync', this.options.workspaceId); }
119124

120125
@memoize
121126
get userDataSyncLogResource(): URI { return joinPath(this.options.logsPath, 'userDataSync.log'); }

0 commit comments

Comments
 (0)