From: Timo Sirainen Date: Tue, 31 Mar 2020 14:50:42 +0000 (+0300) Subject: lib-index: After cache is marked corrupted, don't log error if cache file isn't found X-Git-Tag: 2.3.11.2~381 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d1512f79a0b6049dcb105be6248b482133fb18b;p=thirdparty%2Fdovecot%2Fcore.git lib-index: After cache is marked corrupted, don't log error if cache file isn't found It's just an unnecessary extra error. --- diff --git a/src/lib-index/mail-cache.c b/src/lib-index/mail-cache.c index 0aa9c0e1d8..2d24ce992a 100644 --- a/src/lib-index/mail-cache.c +++ b/src/lib-index/mail-cache.c @@ -173,7 +173,10 @@ static bool mail_cache_need_reopen(struct mail_cache *cache) nfs_flush_file_handle_cache(cache->filepath); } if (nfs_safe_stat(cache->filepath, &st) < 0) { - mail_cache_set_syscall_error(cache, "stat()"); + /* if cache was already marked as corrupted, don't log errors + about nonexistent cache file */ + if (cache->hdr != NULL || errno != ENOENT) + mail_cache_set_syscall_error(cache, "stat()"); return TRUE; } cache->last_stat_size = st.st_size;