dovecot: If index is in memory, don't try to unlink() cache file.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Aug 2 15:56:53 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/6e9b6468398f
changeset: 6158:6e9b6468398f
user: Timo Sirainen <tss at iki.fi>
date: Thu Aug 02 15:56:47 2007 +0300
description:
If index is in memory, don't try to unlink() cache file.
diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
src/lib-index/mail-cache.c | 6 ++++--
diffs (16 lines):
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 *mail_cache_create(str
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;
}
More information about the dovecot-cvs
mailing list