File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/vs/workbench/services Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -717,7 +717,7 @@ export class WorkspaceService extends Disposable implements IWorkbenchConfigurat
717
717
if ( e . preserveData ) {
718
718
await Promise . all ( [
719
719
this . copyProfileSettings ( e . previous . settingsResource , e . profile . settingsResource ) ,
720
- this . fileService . copy ( e . previous . tasksResource , e . profile . tasksResource )
720
+ this . copyProfileTasks ( e . previous . tasksResource , e . profile . tasksResource )
721
721
] ) ;
722
722
}
723
723
const promises : Promise < ConfigurationModel > [ ] = [ ] ;
@@ -751,6 +751,12 @@ export class WorkspaceService extends Disposable implements IWorkbenchConfigurat
751
751
await this . fileService . writeFile ( to , VSBuffer . fromString ( toContent ) ) ;
752
752
}
753
753
754
+ private async copyProfileTasks ( from : URI , to : URI ) : Promise < void > {
755
+ if ( await this . fileService . exists ( from ) ) {
756
+ await this . fileService . copy ( from , to ) ;
757
+ }
758
+ }
759
+
754
760
private onDefaultConfigurationChanged ( configurationModel : ConfigurationModel , properties ?: string [ ] ) : void {
755
761
if ( this . workspace ) {
756
762
const previousData = this . _configuration . toData ( ) ;
Original file line number Diff line number Diff line change @@ -743,7 +743,9 @@ class UserKeybindings extends Disposable {
743
743
744
744
private async whenCurrentProfieChanged ( e : DidChangeUserDataProfileEvent ) : Promise < void > {
745
745
if ( e . preserveData ) {
746
- await this . fileService . copy ( e . previous . keybindingsResource , e . profile . keybindingsResource ) ;
746
+ if ( await this . fileService . exists ( e . previous . keybindingsResource ) ) {
747
+ await this . fileService . copy ( e . previous . keybindingsResource , e . profile . keybindingsResource ) ;
748
+ }
747
749
}
748
750
this . watch ( ) ;
749
751
this . reloadConfigurationScheduler . schedule ( ) ;
You can’t perform that action at this time.
0 commit comments