From: Timo Sirainen Date: Sun, 25 May 2008 01:18:42 +0000 (+0300) Subject: When creating a new transaction log, don't reuse an existing one if its X-Git-Tag: 1.1.rc6~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56684951606f4fa13bc18da1f43fbdcb3f656094;p=thirdparty%2Fdovecot%2Fcore.git When creating a new transaction log, don't reuse an existing one if its sequence isn't 1. --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-transaction-log-file.c b/src/lib-index/mail-transaction-log-file.c index cb1f2dfc9a..1dfbb4efad 100644 --- a/src/lib-index/mail-transaction-log-file.c +++ b/src/lib-index/mail-transaction-log-file.c @@ -477,6 +477,8 @@ mail_transaction_log_file_create2(struct mail_transaction_log_file *file, 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);