]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fix adding body.snippet to cache
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 25 Jan 2018 10:27:41 +0000 (12:27 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 5 Feb 2018 11:07:08 +0000 (13:07 +0200)
Unless body.snippet was in mail_always_cache_fields, it didn't get added to
the cache file.

src/lib-storage/index/index-mail.c

index 92a32948682283df82764abd2a461faa26aead32..5ca1dd28ac29123cbf268bea083c39fef6188c20 100644 (file)
@@ -1386,6 +1386,7 @@ index_mail_fetch_body_snippet(struct index_mail *mail, const char **value_r)
                cache_fields[MAIL_CACHE_BODY_SNIPPET].idx;
        string_t *str;
 
+       mail->data.cache_fetch_fields |= MAIL_FETCH_BODY_SNIPPET;
        if (mail->data.body_snippet == NULL) {
                str = str_new(mail->mail.data_pool, 128);
                if (index_mail_cache_lookup_field(mail, str, cache_field) > 0 &&