Skip to content

Commit 0c98611

Browse files
committed
Ensure we only ever set workspace initialized to true
This is just a guard in case there are paths where the workspace is already marked as initialized but the workspace configuration is not and we end up actually un-initializing it.
1 parent 73cb236 commit 0c98611

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

patches/local-storage.diff

+7-3
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,16 @@ Index: code-server/lib/vscode/src/vs/workbench/services/configuration/browser/co
7979
});
8080
}));
8181

82-
@@ -550,6 +552,8 @@ export class WorkspaceService extends Di
82+
@@ -550,6 +552,12 @@ export class WorkspaceService extends Di
8383
previousFolders = this.workspace.folders;
8484
this.workspace.update(workspace);
8585
} else {
86-
+ // The configuration could have updated before the promise resolved.
87-
+ workspace.initialized = this.workspaceConfiguration.initialized;
86+
+ // It is possible for the configuration to become initialized in between
87+
+ // when the workspace was created and this function was called, so check
88+
+ // the configuration again now.
89+
+ if (!workspace.initialized && this.workspaceConfiguration.initialized) {
90+
+ workspace.initialized = true;
91+
+ }
8892
this.workspace = workspace;
8993
}
9094

0 commit comments

Comments
 (0)