]> granicus.if.org Git - neomutt/commitdiff
Try to fix the mbox_check_stats() merge
authorPietro Cerutti <gahr@gahr.ch>
Fri, 7 Dec 2018 09:58:32 +0000 (09:58 +0000)
committerRichard Russon <rich@flatcap.org>
Fri, 7 Dec 2018 11:03:54 +0000 (11:03 +0000)
imap/imap.c
mailbox.c

index 37276773f499b4eaeff561c40f309b48a78ae0d9..382adf9be15925902b083412866208554e6f46ff 100644 (file)
@@ -1338,6 +1338,12 @@ static int imap_status(struct ImapAccountData *adata, struct ImapMboxData *mdata
  */
 int imap_mbox_check_stats(struct Mailbox *m, int flags)
 {
+  if (imap_prepare_mailbox(m))
+  {
+    m->has_new = false;
+    return -1;
+  }
+
   struct ImapAccountData *adata = imap_adata_get(m);
   struct ImapMboxData *mdata = imap_mdata_get(m);
 
index 6343f12b55cb175385643610e9faa0210ff86897..83dbe080a1bfef25004dbe44b329edaf4aa3f389 100644 (file)
--- a/mailbox.c
+++ b/mailbox.c
@@ -172,9 +172,6 @@ static void mailbox_check(struct Mailbox *m, struct stat *ctx_sb, bool check_sta
     switch (m->magic)
     {
       case MUTT_IMAP:
-        if (!m->has_new)
-          break;
-        /* fallthrough */
       case MUTT_MBOX:
       case MUTT_MMDF:
       case MUTT_MAILDIR: