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