mirror of https://github.com/coder/code-server.git
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:
parent
73cb236535
commit
0c98611e6b
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue