From c1ba2a26977a229c83954c9946ab2b3b9b7a7bfc Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 1 Dec 2021 08:51:24 +0100 Subject: [PATCH] Check if POP3 inbox closed --- app/src/main/java/eu/faircode/email/Core.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 65d4b0047d..d13a19d6f1 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -216,8 +216,16 @@ class Core { throw new IllegalArgumentException("Invalid folder=" + folder.id + "/" + op.folder); if (account.protocol == EntityAccount.TYPE_IMAP && - !folder.local && ifolder != null && !ifolder.isOpen()) { - Log.w(folder.name + " is closed"); + !folder.local && + ifolder != null && !ifolder.isOpen()) { + EntityLog.log(context, account.name + "/" + folder.name + " is closed"); + return; + } + + if (account.protocol == EntityAccount.TYPE_POP && + EntityFolder.INBOX.equals(folder.type) && + ifolder != null && !ifolder.isOpen()) { + EntityLog.log(context, account.name + "/" + folder.name + " is closed"); return; }