1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

All: Testing and better handling of E2EE initialisation

This commit is contained in:
Laurent Cozic
2017-12-17 20:51:45 +01:00
parent f5d26e0d81
commit 4c0b472f67
7 changed files with 136 additions and 13 deletions

View File

@@ -570,8 +570,14 @@ class Synchronizer {
await BaseItem.deleteOrphanSyncItems();
}
} catch (error) {
this.logger().error(error);
this.progressReport_.errors.push(error);
if (error && error.code === 'noActiveMasterKey') {
// Don't log an error for this as this is a common
// condition that the UI should report anyway.
this.logger().info(error.message);
} else {
this.logger().error(error);
this.progressReport_.errors.push(error);
}
}
if (this.cancelling()) {
@@ -588,6 +594,7 @@ class Synchronizer {
this.logger().info('Using master key: ', mk);
await this.encryptionService().initializeEncryption(mk);
await this.encryptionService().loadMasterKeysFromSettings();
this.logger().info('Encryption has been enabled with downloaded master key as active key. However, note that no password was initially supplied. It will need to be provided by user.');
}
}