Merge pull request #3734 from k9mail/fix_expunge_message

Only try to expunge a message if the Backend supports it
This commit is contained in:
Vincent Breitmoser 2018-11-21 10:29:19 +01:00 committed by GitHub
commit 0f7d0963f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -971,7 +971,7 @@ public class MessagingController {
remoteUidMap = backend.moveMessages(srcFolder, destFolder, uids);
}
if (!isCopy && Expunge.EXPUNGE_IMMEDIATELY == account.getExpungePolicy()) {
if (!isCopy && backend.getSupportsExpunge() && account.getExpungePolicy() == Expunge.EXPUNGE_IMMEDIATELY) {
Timber.i("processingPendingMoveOrCopy expunging folder %s:%s", account.getDescription(), srcFolder);
backend.expungeMessages(srcFolder, uids);
}