]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: fsck shouldn't assert-crash when no .log file exists
authorTimo Sirainen <tss@iki.fi>
Mon, 13 Sep 2010 10:56:08 +0000 (11:56 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 13 Sep 2010 10:56:08 +0000 (11:56 +0100)
src/lib-index/mail-index-fsck.c

index af1f65002716c04c9cb371e1dcec2bed5a644ba1..2ca8ba5b1beb2ad3733a777dbaa59d06612909ac 100644 (file)
@@ -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) {