]> 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:38:57 +0000 (14:38 +0300)
When closing the mail, only in-memory mail bodies were stored to cache.

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

index 45fc902eb2089beee59150fa96467248ae33f8cc..a3278bbdede7464e7281eb386139a0cefaac4dda 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 {