]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: mail_cache_need_reopen() - Don't skip reopen just because compression...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 30 Mar 2020 12:07:40 +0000 (15:07 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 15 Apr 2020 09:41:42 +0000 (12:41 +0300)
The new cache file may still be usable until the compression is done.

src/lib-index/mail-cache.c

index 545ba5f5fcdf23e34881aa7345a28965947583cd..98cdc19c742d897f9d5270845d90632a8e683aa2 100644 (file)
@@ -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)