1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 09:47:13 +00:00

Handle move errors

This commit is contained in:
M66B 2019-12-01 12:52:40 +01:00
parent 923e51f75e
commit cf9d5cc149

View file

@ -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);
}