From: Timo Sirainen Date: Mon, 13 Sep 2010 10:56:08 +0000 (+0100) Subject: lib-index: fsck shouldn't assert-crash when no .log file exists X-Git-Tag: 2.0.3~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3e42e3748e489b62554ae0562b5537c20defc1ee;p=thirdparty%2Fdovecot%2Fcore.git lib-index: fsck shouldn't assert-crash when no .log file exists --- diff --git a/src/lib-index/mail-index-fsck.c b/src/lib-index/mail-index-fsck.c index af1f650027..2ca8ba5b1b 100644 --- a/src/lib-index/mail-index-fsck.c +++ b/src/lib-index/mail-index-fsck.c @@ -433,9 +433,9 @@ int mail_index_fsck(struct mail_index *index) if (index->log->head == NULL) { /* we're trying to open the index files, but there wasn't - any .log file. this should be rare, so just fsck it without - locking. */ - orig_locked = TRUE; + any .log file. */ + if (mail_transaction_log_create(index->log, FALSE) < 0) + return -1; } if (!orig_locked) {