From: Kevin McCarthy Date: Wed, 27 Sep 2017 02:44:11 +0000 (-0700) Subject: Fix uses of context->changed as a counter. X-Git-Tag: neomutt-20171006~9^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8575472931e538fbffbd65aee6d8c9ca35ccba11;p=neomutt Fix uses of context->changed as a counter. The first was in mx_update_tables(), but only when "not committing". This is used by mh/maildir during an "occult" update, and in imap when expunging the mailbox. It meant to simply turn on changed when a single changed header is seen. The second use was in imap_sync_message_for_copy(). Previously this was used for a server side copy/save, but is now also used for fast-trash copying. Remove the code that was trying to decrement the counter: this function is not capable of properly setting a status bit. --- diff --git a/imap/imap.c b/imap/imap.c index d22a9e19b..dbc479104 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -1147,10 +1147,7 @@ int imap_sync_message_for_copy(struct ImapData *idata, struct Header *hdr, if (!compare_flags_for_copy(hdr)) { if (hdr->deleted == HEADER_DATA(hdr)->deleted) - { hdr->changed = false; - idata->ctx->changed = false; - } return 0; } @@ -1213,10 +1210,7 @@ int imap_sync_message_for_copy(struct ImapData *idata, struct Header *hdr, hdr->active = true; if (hdr->deleted == HEADER_DATA(hdr)->deleted) - { hdr->changed = false; - idata->ctx->changed = false; - } return 0; }