From: Kevin McCarthy Date: Mon, 14 Nov 2016 04:02:34 +0000 (-0800) Subject: Compress: remove buffy stats "improvisation". X-Git-Tag: mutt-1-8-rel~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c96c9496129422768f8a2b9da7e79c34b07870b;p=mutt Compress: remove buffy stats "improvisation". Mutt doesn't support polling compressed mailboxes. This code creates a false impression and dirties mutt_save_message() in the process. I don't like it, so am taking it out. --- diff --git a/commands.c b/commands.c index 25b22262..42436231 100644 --- a/commands.c +++ b/commands.c @@ -837,16 +837,6 @@ int mutt_save_message (HEADER *h, int delete, if (mx_open_mailbox (buf, MUTT_APPEND, &ctx) != NULL) { -#ifdef USE_COMPRESSED - /* If we're saving to a compressed mailbox, the stats won't be updated - * until the next open. Until then, improvise. */ - BUFFY *cm = NULL; - if (ctx.compress_info) - cm = mutt_find_mailbox (ctx.realpath); - /* We probably haven't been opened yet */ - if (cm && (cm->msg_count == 0)) - cm = NULL; -#endif if (h) { if (_mutt_save_message(h, &ctx, delete, decode, decrypt) != 0) @@ -854,16 +844,6 @@ int mutt_save_message (HEADER *h, int delete, mx_close_mailbox (&ctx, NULL); return -1; } -#ifdef USE_COMPRESSED - if (cm) - { - cm->msg_count++; - if (!h->read) - cm->msg_unread++; - if (h->flagged) - cm->msg_flagged++; - } -#endif } else { @@ -878,17 +858,6 @@ int mutt_save_message (HEADER *h, int delete, mx_close_mailbox (&ctx, NULL); return -1; } -#ifdef USE_COMPRESSED - if (cm) - { - HEADER *h = Context->hdrs[Context->v2r[i]]; - cm->msg_count++; - if (!h->read) - cm->msg_unread++; - if (h->flagged) - cm->msg_flagged++; - } -#endif } } }