changeset 7546:7940ff8ecd13 HEAD

When creating a new transaction log, don't reuse an existing one if its sequence isn't 1.
author Timo Sirainen <tss@iki.fi>
date Sun, 25 May 2008 04:18:42 +0300
parents 2c3bb09045be
children baf21d1db4e5
files src/lib-index/mail-transaction-log-file.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log-file.c	Sun May 25 04:17:39 2008 +0300
+++ b/src/lib-index/mail-transaction-log-file.c	Sun May 25 04:18:42 2008 +0300
@@ -477,6 +477,8 @@
 			file->fd = fd;
 			if (mail_transaction_log_file_read_hdr(file,
 							       FALSE) > 0 &&
+			    file->hdr.file_seq == 1 &&
+			    file->hdr.prev_file_seq == 0 &&
 			    mail_transaction_log_file_stat(file, FALSE) == 0) {
 				/* yes, it was ok */
 				(void)file_dotlock_delete(dotlock);