Skip to content

Commit 34ee4b8

Browse files
author
Benjamin Pasero
committed
storage - always have a workspace identifier
1 parent 5c3a40b commit 34ee4b8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/vs/platform/storage/common/storageLegacyService.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ export class StorageLegacyService implements IStorageLegacyService {
122122
// which is only possible if a id property is provided that we can check on
123123
if (types.isNumber(legacyWorkspaceId)) {
124124
this.cleanupWorkspaceScope(legacyWorkspaceId);
125+
} else {
126+
// ensure that we always store a workspace identifier because this key
127+
// is used to migrate data out as needed
128+
const workspaceIdentifier = this.getInteger(StorageLegacyService.WORKSPACE_IDENTIFIER, StorageLegacyScope.WORKSPACE);
129+
if (!workspaceIdentifier) {
130+
this.store(StorageLegacyService.WORKSPACE_IDENTIFIER, 42, StorageLegacyScope.WORKSPACE);
131+
}
125132
}
126133
}
127134

0 commit comments

Comments
 (0)