1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Mobile: Fixes #9123: Fix encryption when a resource doesn't have an associated file (#9222)

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
This commit is contained in:
Henry Heino
2023-11-10 06:22:26 -08:00
committed by GitHub
parent ca6762c891
commit e6e9f92e01
3 changed files with 22 additions and 1 deletions

View File

@ -224,7 +224,11 @@ export default class Resource extends BaseItem {
masterKeyId: share && share.master_key_id ? share.master_key_id : '',
});
} catch (error) {
if (error.code === 'ENOENT') throw new JoplinError(`File not found:${error.toString()}`, 'fileNotFound');
if (error.code === 'ENOENT') {
throw new JoplinError(
`Trying to encrypt resource but only metadata is present: ${error.toString()}`, 'fileNotFound',
);
}
throw error;
}