From c233825a286a25a1f6dae4713536f9df385e3b7a Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 3 Mar 2024 21:06:39 +0100 Subject: [PATCH] Check folder open on IMAP deleted check --- app/src/main/java/eu/faircode/email/Core.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 5e2169ff0d..74da316986 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -4001,6 +4001,8 @@ class Core { List deleted = new ArrayList<>(); for (int i = 0; i < imessages.length; i++) { state.ensureRunning("Sync/IMAP/delete"); + if (!ifolder.isOpen()) + throw new FolderClosedException(ifolder); try { if (perform_expunge && imessages[i].isSet(Flags.Flag.DELETED))