* fix #189138

* feedback
This commit is contained in:
Sandeep Somavarapu
2023-08-23 11:50:46 +02:00
committed by GitHub
parent 6408ba941f
commit 2cfdb5302a

View File

@@ -259,8 +259,8 @@ class FileServiceBasedConfiguration extends Disposable {
const resolveContents = async (resources: URI[]): Promise<(string | undefined)[]> => {
return Promise.all(resources.map(async resource => {
try {
const content = (await this.fileService.readFile(resource)).value.toString();
return content;
const content = await this.fileService.readFile(resource, { atomic: true });
return content.value.toString();
} catch (error) {
this.logService.trace(`Error while resolving configuration file '${resource.toString()}': ${errors.getErrorMessage(error)}`);
if ((<FileOperationError>error).fileOperationResult !== FileOperationResult.FILE_NOT_FOUND
@@ -494,7 +494,7 @@ class FileServiceBasedRemoteUserConfiguration extends Disposable {
}
async resolveContent(): Promise<string> {
const content = await this.fileService.readFile(this.configurationResource);
const content = await this.fileService.readFile(this.configurationResource, { atomic: true });
return content.value.toString();
}
@@ -764,7 +764,7 @@ class FileServiceBasedWorkspaceConfiguration extends Disposable {
}
async resolveContent(workspaceIdentifier: IWorkspaceIdentifier): Promise<string> {
const content = await this.fileService.readFile(workspaceIdentifier.configPath);
const content = await this.fileService.readFile(workspaceIdentifier.configPath, { atomic: true });
return content.value.toString();
}