]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: mail_cache_transaction_rollback() - fix updating deleted_record_count
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 30 Mar 2020 14:34:45 +0000 (17:34 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 15 Apr 2020 09:41:42 +0000 (12:41 +0300)
The deleted_record_count in cache header wasn't actually being updated
because hdr_modified wasn't TRUE.

src/lib-index/mail-cache-transaction.c

index 7353d902605063f2b613652eef1aa1e30d0b64b4..46916a02f3ca2857743161d9512861e0b28b56bc 100644 (file)
@@ -156,6 +156,7 @@ void mail_cache_transaction_rollback(struct mail_cache_transaction_ctx **_ctx)
                if (mail_cache_transaction_lock(ctx) > 0) {
                        ctx->cache->hdr_copy.deleted_record_count +=
                                ctx->records_written;
+                       ctx->cache->hdr_modified = TRUE;
                        (void)mail_cache_flush_and_unlock(ctx->cache);
                }
        }