lowercase the name of the inbox
[org.ibex.mail.git] / src / org / ibex / mail / IMAP.java
index 9de6241..f97e771 100644 (file)
@@ -230,7 +230,8 @@ public class IMAP {
             Vec.Int vec = new Vec.Int();
             for(Mailbox.Iterator it = selected().iterator(q); it.next();) {
                 vec.addElement(uid ? it.uid() : it.imapNumber());
-                it.setFlags(it.getFlags() & ~Mailbox.Flag.RECENT);
+                if ((it.getFlags() & Mailbox.Flag.RECENT) != 0)
+                    it.setFlags(it.getFlags() & ~Mailbox.Flag.RECENT);
             }
             return vec.dump();
         }
@@ -293,7 +294,7 @@ public class IMAP {
             } else {
                 Account account = (Account)ret;
                 ((MailboxWrapper)api).root = root = account.getMailbox(IMAP.class);
-                MailTree ibt = root.slash("INBOX", false);
+                MailTree ibt = root.slash("inbox", false);
                 Mailbox ib = ibt==null ? null : ibt.getMailbox();
                 ((MailboxWrapper)api).inbox = inbox = ib;
             }