]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imapc: Fix caching >= 32 kB mail bodies
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 17 Jul 2017 11:05:45 +0000 (14:05 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 17 Jul 2017 11:05:45 +0000 (14:05 +0300)
When closing the mail, only in-memory mail bodies were stored to cache.

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

index de2ad35e5e49947fb286252546ff1e1a3ed0e3ce..a5cbd4807a870e34b81cb910d2102f0d754300b8 100644 (file)
@@ -441,7 +441,7 @@ static void imapc_mail_close(struct mail *_mail)
        if (mail->body_fetched) {
                imapc_mail_cache_free(cache);
                cache->uid = _mail->uid;
-               if (cache->fd != -1) {
+               if (mail->fd != -1) {
                        cache->fd = mail->fd;
                        mail->fd = -1;
                } else {