Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2914:37b81e395f00 HEAD
Make sure we don't try to write to cache file when it's already closed
(could happen if it was corrupted).
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 29 Nov 2004 03:25:45 +0200 |
parents | cd293e5e6a71 |
children | 25bc79e67271 |
files | src/lib-index/mail-cache-transaction.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-cache-transaction.c Mon Nov 29 03:16:30 2004 +0200 +++ b/src/lib-index/mail-cache-transaction.c Mon Nov 29 03:25:45 2004 +0200 @@ -271,6 +271,9 @@ i_assert(cache->locked); + if (MAIL_CACHE_IS_UNUSABLE(cache)) + return; + if (offset + size == cache->hdr_copy.used_file_size) { /* we can just set used_file_size back */ cache->hdr_modified = TRUE;