]> granicus.if.org Git - neomutt/commitdiff
Reset buffy->new for the current mailbox in IMAP.
authorKevin McCarthy <kevin@8t8.us>
Tue, 14 Jun 2016 20:11:56 +0000 (13:11 -0700)
committerRichard Russon <rich@flatcap.org>
Thu, 7 Jul 2016 13:03:37 +0000 (14:03 +0100)
1f840760e6e0 moved the buffy->new reset inside the STATUS processor.
Since the current mailbox is not STATUS'ed, it needs to be reset in
imap_buffy_check().

Thanks to Aaron Schrab for reporting this issue (and for helping test
tip).

imap/imap.c

index 1b63b3a31ca6030951ebaa84cdc5482761ef7eca..2b1fc6d978ce1e3b601bf90cd549f7b7b4fb70cc 100644 (file)
@@ -1504,14 +1504,20 @@ int imap_buffy_check (int force)
     mailbox->new = 0;
 
     if (imap_get_mailbox (mailbox->path, &idata, name, sizeof (name)) < 0)
+    {
+      mailbox->new = 0;
       continue;
+    }
 
     /* Don't issue STATUS on the selected mailbox, it will be NOOPed or
      * IDLEd elsewhere.
      * idata->mailbox may be NULL for connections other than the current
      * mailbox's, and shouldn't expand to INBOX in that case. #3216. */
     if (idata->mailbox && !imap_mxcmp (name, idata->mailbox))
+    {
+      mailbox->new = 0;
       continue;
+    }
 
     if (!mutt_bit_isset (idata->capabilities, IMAP4REV1) &&
         !mutt_bit_isset (idata->capabilities, STATUS))