From: Markus Valentin Date: Tue, 3 Sep 2019 12:38:17 +0000 (+0200) Subject: imap: previews/snippets requested with lazy update the caching decision X-Git-Tag: 2.3.9~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7904c7253570ef70ba49091c0d57297cc60c3e1;p=thirdparty%2Fdovecot%2Fcore.git imap: previews/snippets requested with lazy update the caching decision If lazy is true set the lookup_abort to NOT_IN_CACHE_START_CACHING which results in the snippet field becoming wanted for caching. --- diff --git a/src/imap/imap-fetch-body.c b/src/imap/imap-fetch-body.c index d1fd1a3743..d5c06c6bca 100644 --- a/src/imap/imap-fetch-body.c +++ b/src/imap/imap-fetch-body.c @@ -594,7 +594,7 @@ fetch_snippet(struct imap_fetch_context *ctx, struct mail *mail, void *context) { const bool lazy = context != NULL; - enum mail_lookup_abort temp_lookup_abort = lazy ? MAIL_LOOKUP_ABORT_NOT_IN_CACHE : mail->lookup_abort; + enum mail_lookup_abort temp_lookup_abort = lazy ? MAIL_LOOKUP_ABORT_NOT_IN_CACHE_START_CACHING : mail->lookup_abort; enum mail_lookup_abort orig_lookup_abort = mail->lookup_abort; const char *resp, *snippet; int ret;