From 3e42e3748e489b62554ae0562b5537c20defc1ee Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 13 Sep 2010 11:56:08 +0100 Subject: [PATCH] lib-index: fsck shouldn't assert-crash when no .log file exists --- src/lib-index/mail-index-fsck.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.47.3