You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-06 23:56:13 +02:00
This commit is contained in:
@ -142,14 +142,10 @@ export async function loadMasterKeysFromSettings(service: EncryptionService) {
|
||||
const mk = masterKeys[i];
|
||||
if (service.isMasterKeyLoaded(mk)) continue;
|
||||
|
||||
const password = await findMasterKeyPassword(service, mk);
|
||||
if (!password) continue;
|
||||
|
||||
try {
|
||||
await service.loadMasterKey(mk, password, activeMasterKeyId === mk.id);
|
||||
} catch (error) {
|
||||
logger.warn(`Cannot load master key ${mk.id}. Invalid password?`, error);
|
||||
}
|
||||
await service.loadMasterKey(mk, async () => {
|
||||
const password = await findMasterKeyPassword(service, mk);
|
||||
return password;
|
||||
}, activeMasterKeyId === mk.id);
|
||||
}
|
||||
|
||||
logger.info(`Loaded master keys: ${service.loadedMasterKeysCount()}`);
|
||||
|
Reference in New Issue
Block a user