From 0f377a428afcc5e008f6c83d1024e95b7b02a668 Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Wed, 15 Mar 2006 02:02:22 +0000 Subject: [PATCH] Only synthesize UIDNEXT if we've fetched uncached messages. Fixes a FETCH 1:0 bug Bruno Postle reported and helped to debug. --- imap/message.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imap/message.c b/imap/message.c index 432af024..faad9969 100644 --- a/imap/message.c +++ b/imap/message.c @@ -323,9 +323,9 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend) #if USE_HCACHE mutt_hcache_store_raw (hc, "/UIDVALIDITY", &idata->uid_validity, sizeof (idata->uid_validity), imap_hcache_keylen); - if (idata->uidnext < maxuid + 1) + if (maxuid && idata->uidnext < maxuid + 1) { - dprint (2, (debugfile, "Overriding UIDNEXT: %u -> %u", idata->uidnext, maxuid + 1)); + dprint (2, (debugfile, "Overriding UIDNEXT: %u -> %u\n", idata->uidnext, maxuid + 1)); idata->uidnext = maxuid + 1; } mutt_hcache_store_raw (hc, "/UIDNEXT", &idata->uidnext, -- 2.40.0