Skip to content

Commit beb2a42

Browse files
committed
1 parent 0ef6121 commit beb2a42

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/vs/platform/userDataSync/common/keybindingsSync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export class KeybindingsSynchroniser extends AbstractJsonFileSynchroniser implem
311311

312312
if (remoteContent) {
313313
const localContent: string = fileContent ? fileContent.value.toString() : '[]';
314-
if (this.hasErrors(localContent)) {
314+
if (!localContent.trim() || this.hasErrors(localContent)) {
315315
throw new UserDataSyncError(localize('errorInvalidSettings', "Unable to sync keybindings as there are errors/warning in keybindings file."), UserDataSyncErrorCode.LocalInvalidContent, this.resource);
316316
}
317317

src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
342342
const errorArea = getSyncAreaLabel(source);
343343
const handle = this.notificationService.notify({
344344
severity: Severity.Error,
345-
message: localize('errorInvalidConfiguration', "Unable to sync {0} because there are some errors/warnings in the file. Please open the file to correct errors/warnings in it.", errorArea.toLowerCase()),
345+
message: localize('errorInvalidConfiguration', "Unable to sync {0} because the content in the file is not valid. Please open the file and correct it.", errorArea.toLowerCase()),
346346
actions: {
347347
primary: [new Action('open sync file', localize('open file', "Open {0} File", errorArea), undefined, true,
348348
() => source === SyncResource.Settings ? this.preferencesService.openGlobalSettings(true) : this.preferencesService.openGlobalKeybindingSettings(true))]

0 commit comments

Comments
 (0)