thrownewUserDataSyncError(localize('errorInvalidSettings',"Unable to sync keybindings because the content in the file is not valid. Please open the file and correct it."),UserDataSyncErrorCode.LocalInvalidContent,this.resource);
thrownewUserDataSyncError(localize('errorInvalidSettings',"Unable to sync keybindings because the content in the file is not valid. Please open the file and correct it."),UserDataSyncErrorCode.LocalInvalidContent,this.resource);
}
}
...
@@ -177,8 +178,12 @@ export class KeybindingsSynchroniser extends AbstractJsonFileSynchroniser implem
...
@@ -177,8 +178,12 @@ export class KeybindingsSynchroniser extends AbstractJsonFileSynchroniser implem
this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing keybindings.`);
this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing keybindings.`);
}
}
if(content!==null&&this.hasErrors(content)){
if(content!==null){
thrownewUserDataSyncError(localize('errorInvalidSettings',"Unable to sync keybindings because the content in the file is not valid. Please open the file and correct it."),UserDataSyncErrorCode.LocalInvalidContent,this.resource);
content=content.trim();
content=content||'[]';
if(this.hasErrors(content)){
thrownewUserDataSyncError(localize('errorInvalidSettings',"Unable to sync keybindings because the content in the file is not valid. Please open the file and correct it."),UserDataSyncErrorCode.LocalInvalidContent,this.resource);