From 3f7b36a35f5ccc11c744297695a0e1935ff356a5 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 26 Jan 2017 09:55:22 +0200 Subject: [PATCH] lib-index: Don't log error on dovecot.index.cache delete if it doesn't exist For example if a cache is marked as corrupted and there is no cache, it's not really an error that it doesn't exist. Fixes: Error: unlink(.../dovecot.index.cache) failed: No such file or directory (in mail-cache.c:29) --- src/lib-index/mail-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib-index/mail-cache.c b/src/lib-index/mail-cache.c index 67b65d8722..abdd627c01 100644 --- a/src/lib-index/mail-cache.c +++ b/src/lib-index/mail-cache.c @@ -26,7 +26,7 @@ void mail_cache_set_syscall_error(struct mail_cache *cache, static void mail_cache_unlink(struct mail_cache *cache) { if (!cache->index->readonly && !MAIL_INDEX_IS_IN_MEMORY(cache->index)) - i_unlink(cache->filepath); + i_unlink_if_exists(cache->filepath); } void mail_cache_reset(struct mail_cache *cache)