mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
parent
89b035aa3d
commit
d98ae61984
|
@ -717,7 +717,7 @@ export class WorkspaceService extends Disposable implements IWorkbenchConfigurat
|
|||
if (e.preserveData) {
|
||||
await Promise.all([
|
||||
this.copyProfileSettings(e.previous.settingsResource, e.profile.settingsResource),
|
||||
this.fileService.copy(e.previous.tasksResource, e.profile.tasksResource)
|
||||
this.copyProfileTasks(e.previous.tasksResource, e.profile.tasksResource)
|
||||
]);
|
||||
}
|
||||
const promises: Promise<ConfigurationModel>[] = [];
|
||||
|
@ -751,6 +751,12 @@ export class WorkspaceService extends Disposable implements IWorkbenchConfigurat
|
|||
await this.fileService.writeFile(to, VSBuffer.fromString(toContent));
|
||||
}
|
||||
|
||||
private async copyProfileTasks(from: URI, to: URI): Promise<void> {
|
||||
if (await this.fileService.exists(from)) {
|
||||
await this.fileService.copy(from, to);
|
||||
}
|
||||
}
|
||||
|
||||
private onDefaultConfigurationChanged(configurationModel: ConfigurationModel, properties?: string[]): void {
|
||||
if (this.workspace) {
|
||||
const previousData = this._configuration.toData();
|
||||
|
|
|
@ -743,7 +743,9 @@ class UserKeybindings extends Disposable {
|
|||
|
||||
private async whenCurrentProfieChanged(e: DidChangeUserDataProfileEvent): Promise<void> {
|
||||
if (e.preserveData) {
|
||||
await this.fileService.copy(e.previous.keybindingsResource, e.profile.keybindingsResource);
|
||||
if (await this.fileService.exists(e.previous.keybindingsResource)) {
|
||||
await this.fileService.copy(e.previous.keybindingsResource, e.profile.keybindingsResource);
|
||||
}
|
||||
}
|
||||
this.watch();
|
||||
this.reloadConfigurationScheduler.schedule();
|
||||
|
|
Loading…
Reference in a new issue