]> granicus.if.org Git - neomutt/commitdiff
The attached patch fixes a couple bugs I introduced recently when
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 24 Jul 2001 06:42:06 +0000 (06:42 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 24 Jul 2001 06:42:06 +0000 (06:42 +0000)
working around the buggy but firmly entrenched UW-IMAP 4.7 server.
These resulted in additional overhead when synchronising mailboxes
and occasional problems opening empty mailboxes.

From: Brendan Cully <brendan@kublai.com>

imap/imap.c

index 046d1c2ad9bdba0ec3e70353f98cefbea4455d14..dc575ea5e2f02be84f30b247999a299bca87a07c 100644 (file)
@@ -526,9 +526,10 @@ int imap_open_mailbox (CONTEXT* ctx)
 
   idata->ctx = ctx;
 
-  /* clear status, ACL */
+  /* clear mailbox status */
   idata->status = 0;
   memset (idata->rights, 0, (RIGHTSMAX+7)/8);
+  idata->newMailCount = 0;
 
   mutt_message (_("Selecting %s..."), idata->mailbox);
   imap_munge_mbox_name (buf, sizeof(buf), idata->mailbox);
@@ -933,7 +934,7 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int* index_hint)
   /* save status changes */
   for (n = 0; n < ctx->msgcount; n++)
   {
-    if (ctx->hdrs[n]->changed)
+    if (ctx->hdrs[n]->active && ctx->hdrs[n]->changed)
     {
       ctx->hdrs[n]->changed = 0;