changeset 5996:00be53d8f076 HEAD

Fixed "duplicate transaction log sequence" errors when we noticed that log file was recreated while we were trying to create it ourself.
author Timo Sirainen <tss@iki.fi>
date Sun, 15 Jul 2007 00:28:08 +0300
parents 2473829b42b2
children e047e5b19fbd
files src/lib-index/mail-transaction-log-file.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log-file.c	Sat Jul 14 23:59:29 2007 +0300
+++ b/src/lib-index/mail-transaction-log-file.c	Sun Jul 15 00:28:08 2007 +0300
@@ -472,7 +472,8 @@
 		} else {
 			file->fd = fd;
 			if (mail_transaction_log_file_read_hdr(file,
-							       FALSE) > 0) {
+							       FALSE) > 0 &&
+			    mail_transaction_log_file_stat(file, FALSE) == 0) {
 				/* yes, it was ok */
 				(void)file_dotlock_delete(dotlock);
 				mail_transaction_log_file_add_to_list(file);