# HG changeset patch # User Timo Sirainen # Date 1186059407 -10800 # Node ID 6e9b6468398fbc3833e5be7ea1504bda0a4fe2dc # Parent e458f915009ed7afe66f8cd2b6f789077a513238 If index is in memory, don't try to unlink() cache file. diff -r e458f915009e -r 6e9b6468398f src/lib-index/mail-cache.c --- a/src/lib-index/mail-cache.c Thu Aug 02 15:35:27 2007 +0300 +++ b/src/lib-index/mail-cache.c Thu Aug 02 15:56:47 2007 +0300 @@ -369,8 +369,10 @@ struct mail_cache *cache; cache = mail_cache_alloc(index); - if (unlink(cache->filepath) < 0 && errno != ENOENT) - mail_cache_set_syscall_error(cache, "unlink()"); + if (!MAIL_INDEX_IS_IN_MEMORY(index)) { + if (unlink(cache->filepath) < 0 && errno != ENOENT) + mail_cache_set_syscall_error(cache, "unlink()"); + } return cache; }