From e79766b87117786404b306889f5b3e5e7b7642a1 Mon Sep 17 00:00:00 2001 From: cketti Date: Wed, 21 Nov 2018 02:35:18 +0100 Subject: [PATCH] Only try to expunge a message if the Backend supports it --- .../main/java/com/fsck/k9/controller/MessagingController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java b/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java index a8b919021..c69a1471c 100644 --- a/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java +++ b/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java @@ -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); }