changeset 21447:de3c25669608

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)
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 26 Jan 2017 09:55:22 +0200
parents d6ca4c4c7202
children 66253aee7ebf
files src/lib-index/mail-cache.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-cache.c	Thu Jan 26 19:51:34 2017 +0200
+++ b/src/lib-index/mail-cache.c	Thu Jan 26 09:55:22 2017 +0200
@@ -26,7 +26,7 @@
 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)