Handle expunge fail on add

This commit is contained in:
M66B 2021-02-05 09:22:26 +01:00
parent 0223efaf8a
commit fa48c8c7e4
1 changed files with 9 additions and 3 deletions

View File

@ -652,12 +652,18 @@ class Core {
Log.i(name + " deleting uid=" + muid + " for msgid=" + msgid);
iexisting.setFlag(Flags.Flag.DELETED, true);
purged = true;
} catch (MessageRemovedException ignored) {
} catch (MessagingException ignored) {
Log.w(name + " existing gone uid=" + muid + " for msgid=" + msgid);
}
}
if (purged)
ifolder.expunge();
try {
ifolder.expunge();
} catch (MessagingException ex) {
// NO EXPUNGE failed.
Log.e(ex);
}
}
}
@ -1336,7 +1342,7 @@ class Core {
}
if (deleted)
ifolder.expunge();
ifolder.expunge(); // NO EXPUNGE failed.
db.message().deleteMessage(message.id);
} finally {