From: Brendan Cully Date: Wed, 15 Mar 2006 12:26:00 +0000 (+0000) Subject: Don't store UIDNEXT unless we know it. X-Git-Tag: mutt-1-5-12-rel~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=069aeea7f03dee341dfd5b448cb62e9a42625d84;p=mutt Don't store UIDNEXT unless we know it. --- diff --git a/imap/message.c b/imap/message.c index faad9969..a808b01f 100644 --- a/imap/message.c +++ b/imap/message.c @@ -1,6 +1,6 @@ /* * Copyright (C) 1996-9 Brandon Long - * Copyright (C) 1999-2005 Brendan Cully + * Copyright (C) 1999-2006 Brendan Cully * * 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 */