From c056c16d4cac30b12e03b60766478da146a000b4 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 30 Mar 2020 15:07:40 +0300 Subject: [PATCH] lib-index: mail_cache_need_reopen() - Don't skip reopen just because compression is wanted The new cache file may still be usable until the compression is done. --- src/lib-index/mail-cache.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/lib-index/mail-cache.c b/src/lib-index/mail-cache.c index 545ba5f5fc..98cdc19c74 100644 --- a/src/lib-index/mail-cache.c +++ b/src/lib-index/mail-cache.c @@ -157,15 +157,9 @@ static bool mail_cache_need_reopen(struct mail_cache *cache) { struct stat st; - if (MAIL_CACHE_IS_UNUSABLE(cache)) { - if (cache->need_compress_file_seq != 0) { - /* we're waiting for compression */ - return FALSE; - } - if (MAIL_INDEX_IS_IN_MEMORY(cache->index)) { - /* disabled */ - return FALSE; - } + if (MAIL_INDEX_IS_IN_MEMORY(cache->index)) { + /* disabled */ + return FALSE; } if (cache->fd == -1) -- 2.47.3