From 7d6cefeb508c8f479d6d5f839fde1ea9516e2dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 27 Jan 2016 20:57:43 +0100 Subject: [PATCH] IMAP: Ignore \Noselect mailboxes. * They aren't selectable, so we can just hide them from the user. * This should fix #12369. --- .../inbound_protocols/imap/imap_lib/Commands.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Commands.cpp b/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Commands.cpp index 31cf6e459d..ebe0431946 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Commands.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/Commands.cpp @@ -687,6 +687,14 @@ ListCommand::HandleUntagged(Response& response) && response.IsStringAt(3)) { fSeparator = response.StringAt(2); + if (response.IsListAt(1)) { + // We're not supposed to select \Noselect mailboxes, + // so we'll just hide them + ArgumentList& attributes = response.ListAt(1); + if (attributes.Contains("\\Noselect")) + return true; + } + BString folder = response.StringAt(3); if (folder == "") return true;