]> granicus.if.org Git - mutt/commitdiff
Don't store UIDNEXT unless we know it.
authorBrendan Cully <brendan@kublai.com>
Wed, 15 Mar 2006 12:26:00 +0000 (12:26 +0000)
committerBrendan Cully <brendan@kublai.com>
Wed, 15 Mar 2006 12:26:00 +0000 (12:26 +0000)
imap/message.c

index faad99696eb5cf3ca4d54a098c5a48049b7ed3d1..a808b01f2632d72cee52e0f3c00a2447a36a2d2b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1996-9 Brandon Long <blong@fiction.net>
- * Copyright (C) 1999-2005 Brendan Cully <brendan@kublai.com>
+ * Copyright (C) 1999-2006 Brendan Cully <brendan@kublai.com>
  * 
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
@@ -328,8 +328,9 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
     dprint (2, (debugfile, "Overriding UIDNEXT: %u -> %u\n", idata->uidnext, maxuid + 1));
     idata->uidnext = maxuid + 1;
   }
-  mutt_hcache_store_raw (hc, "/UIDNEXT", &idata->uidnext,
-                       sizeof (idata->uidnext), imap_hcache_keylen);
+  if (idata->uidnext > 1)
+    mutt_hcache_store_raw (hc, "/UIDNEXT", &idata->uidnext,
+                          sizeof (idata->uidnext), imap_hcache_keylen);
   mutt_hcache_close (hc);
 #endif /* USE_HCACHE */