mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 04:53:33 +01:00
committed by
GitHub
parent
6408ba941f
commit
2cfdb5302a
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user