From: Timo Sirainen Date: Mon, 31 Aug 2020 14:23:05 +0000 (+0300) Subject: lib-index: Fix file_size field in mail_cache_purge_finished event X-Git-Tag: 2.3.13~257 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfd065af9ea69ebb1857175fa7fb1770ccc01463;p=thirdparty%2Fdovecot%2Fcore.git lib-index: Fix file_size field in mail_cache_purge_finished event It used to be 32 always. --- diff --git a/src/lib-index/mail-cache-purge.c b/src/lib-index/mail-cache-purge.c index 8ce515f838..f2d1b14a0b 100644 --- a/src/lib-index/mail-cache-purge.c +++ b/src/lib-index/mail-cache-purge.c @@ -340,6 +340,7 @@ mail_cache_copy(struct mail_cache *cache, struct mail_index_transaction *trans, buffer_free(&ctx.buffer); buffer_free(&ctx.field_seen); + *file_size_r = output->offset; (void)o_stream_seek(output, 0); o_stream_nsend(output, &hdr, sizeof(hdr)); @@ -352,7 +353,6 @@ mail_cache_copy(struct mail_cache *cache, struct mail_index_transaction *trans, array_free(ext_offsets); return -1; } - *file_size_r = output->offset; o_stream_destroy(&output); if (cache->index->fsync_mode == FSYNC_MODE_ALWAYS) {