Skip to content

Commit 63504d9

Browse files
committed
fix #133178
1 parent 19091ce commit 63504d9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/vs/workbench/services/configuration/browser/configuration.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ export class FolderConfiguration extends Disposable {
849849
private cachedFolderConfiguration: CachedFolderConfiguration;
850850

851851
constructor(
852+
useCache: boolean,
852853
readonly workspaceFolder: IWorkspaceFolder,
853854
configFolderRelativePath: string,
854855
private readonly workbenchState: WorkbenchState,
@@ -863,7 +864,7 @@ export class FolderConfiguration extends Disposable {
863864
this.scopes = WorkbenchState.WORKSPACE === this.workbenchState ? FOLDER_SCOPES : WORKSPACE_SCOPES;
864865
this.configurationFolder = uriIdentityService.extUri.joinPath(workspaceFolder.uri, configFolderRelativePath);
865866
this.cachedFolderConfiguration = new CachedFolderConfiguration(workspaceFolder.uri, configFolderRelativePath, { scopes: this.scopes, skipRestricted: this.isUntrusted() }, configurationCache);
866-
if (this.configurationCache.needsCaching(workspaceFolder.uri)) {
867+
if (useCache && this.configurationCache.needsCaching(workspaceFolder.uri)) {
867868
this.folderConfiguration = this.cachedFolderConfiguration;
868869
whenProviderRegistered(workspaceFolder.uri, fileService)
869870
.then(() => {

src/vs/workbench/services/configuration/browser/configurationService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ export class WorkspaceService extends Disposable implements IWorkbenchConfigurat
817817
return Promise.all([...folders.map(folder => {
818818
let folderConfiguration = this.cachedFolderConfigs.get(folder.uri);
819819
if (!folderConfiguration) {
820-
folderConfiguration = new FolderConfiguration(folder, FOLDER_CONFIG_FOLDER_NAME, this.getWorkbenchState(), this.isWorkspaceTrusted, this.fileService, this.uriIdentityService, this.logService, this.configurationCache);
820+
folderConfiguration = new FolderConfiguration(!this.initialized, folder, FOLDER_CONFIG_FOLDER_NAME, this.getWorkbenchState(), this.isWorkspaceTrusted, this.fileService, this.uriIdentityService, this.logService, this.configurationCache);
821821
this._register(folderConfiguration.onDidChange(() => this.onWorkspaceFolderConfigurationChanged(folder)));
822822
this.cachedFolderConfigs.set(folder.uri, this._register(folderConfiguration));
823823
}

0 commit comments

Comments
 (0)