Archived
1
0

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.
This commit is contained in:
Asher 2023-11-27 17:28:38 -09:00
parent 73cb236535
commit 0c98611e6b
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -79,12 +79,16 @@ Index: code-server/lib/vscode/src/vs/workbench/services/configuration/browser/co
});
}));
@@ -550,6 +552,8 @@ export class WorkspaceService extends Di
@@ -550,6 +552,12 @@ export class WorkspaceService extends Di
previousFolders = this.workspace.folders;
this.workspace.update(workspace);
} else {
+ // The configuration could have updated before the promise resolved.
+ workspace.initialized = this.workspaceConfiguration.initialized;
+ // It is possible for the configuration to become initialized in between
+ // when the workspace was created and this function was called, so check
+ // the configuration again now.
+ if (!workspace.initialized && this.workspaceConfiguration.initialized) {
+ workspace.initialized = true;
+ }
this.workspace = workspace;
}