From eb480426bf2be7e28960b7ee202d4f77d354f5d8 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 4 Jun 2018 19:16:04 +0300 Subject: [PATCH] lib-storage: Set index_mail_data.body_size if it can be calculated easily Probably doesn't help with anything currently, but makes the code more consistent in how it works. --- src/lib-storage/index/index-mail.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib-storage/index/index-mail.c b/src/lib-storage/index/index-mail.c index 52d74d4c19..23c09ce823 100644 --- a/src/lib-storage/index/index-mail.c +++ b/src/lib-storage/index/index-mail.c @@ -1321,6 +1321,10 @@ int index_mail_init_stream(struct index_mail *mail, /* the sizes were just calculated */ data->inexact_total_sizes = FALSE; } + } else { + /* If body_size==NULL, the caller doesn't care about it. + However, try to set it anyway if it can be calculated. */ + index_mail_try_set_body_size(mail); } ret = index_mail_stream_check_failure(mail); -- 2.47.3