mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 01:36:55 +00:00
Handle move errors
This commit is contained in:
parent
923e51f75e
commit
cf9d5cc149
1 changed files with 4 additions and 2 deletions
|
@ -791,12 +791,14 @@ class Core {
|
|||
Map<Message, EntityMessage> map = new HashMap<>();
|
||||
for (EntityMessage message : messages)
|
||||
try {
|
||||
if (message.uid == null)
|
||||
throw new MessageRemovedException("move without uid");
|
||||
Message imessage = ifolder.getMessageByUID(message.uid);
|
||||
if (imessage == null)
|
||||
throw new MessageRemovedException();
|
||||
throw new MessageRemovedException("move without message");
|
||||
map.put(imessage, message);
|
||||
} catch (MessageRemovedException ex) {
|
||||
Log.w(ex);
|
||||
Log.e(ex);
|
||||
db.message().deleteMessage(message.id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue