From: Brendan Cully Date: Mon, 2 Apr 2007 06:12:45 +0000 (-0700) Subject: Adjust context->size on IMAP load and expunge (closes #2749) X-Git-Tag: mutt-1-5-15-rel~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19eb9ab85565e877d11628cb2a56e9f78f196dbe;p=mutt Adjust context->size on IMAP load and expunge (closes #2749) --- diff --git a/ChangeLog b/ChangeLog index 5be6224c..7f81aee9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-04-01 20:00 -0700 Ambrose Li (38e896c4c192) + + * po/zh_TW.po: Updated Taiwanese translation + +2007-04-01 15:40 -0700 TAKAHASHI Tamotsu (6dcb53bc679c) + + * crypt-gpgme.c: gpgme: check result for signatures pointer + (closes: #2199) + 2007-04-01 15:33 -0700 Brendan Cully (3a81b3793f77) * doc/muttbug.man: Update flea man page to current addresses diff --git a/imap/imap.c b/imap/imap.c index d788b1ba..8a8c64c4 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -258,6 +258,7 @@ void imap_expunge_mailbox (IMAP_DATA* idata) dprint (2, (debugfile, "Expunging message UID %d.\n", HEADER_DATA (h)->uid)); h->active = 0; + idata->ctx->size -= h->content->length; imap_cache_del (idata, h); #if USE_HCACHE diff --git a/imap/message.c b/imap/message.c index 3f3b2347..4a48c452 100644 --- a/imap/message.c +++ b/imap/message.c @@ -190,6 +190,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend) ctx->hdrs[idx]->data = (void *) (h.data); ctx->msgcount++; + ctx->size += ctx->hdrs[idx]->content->length; } else /* bad header in the cache, we'll have to refetch. @@ -292,6 +293,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend) 0, 0); /* content built as a side-effect of mutt_read_rfc822_header */ ctx->hdrs[idx]->content->length = h.content_length; + ctx->size += h.content_length; #if USE_HCACHE sprintf(uid_buf, "/%u", h.data->uid);