]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: fsck: Don't change log_file_tail_offset=0
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 20 May 2018 12:55:03 +0000 (15:55 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 20 May 2018 12:56:44 +0000 (15:56 +0300)
src/lib-index/mail-index-fsck.c

index c58c06befd8af0a8c170a4e6743548e4c9424a86..e4d5f4a8d32d3880d063d7193bfaaf59826eb027 100644 (file)
@@ -47,7 +47,8 @@ mail_index_fsck_log_pos(struct mail_index *index, struct mail_index_map *map,
 
                if (hdr->log_file_tail_offset > hdr->log_file_head_offset)
                        hdr->log_file_tail_offset = hdr->log_file_head_offset;
-               else if (hdr->log_file_tail_offset < MAIL_TRANSACTION_LOG_HEADER_MIN_SIZE)
+               else if (hdr->log_file_tail_offset != 0 &&
+                        hdr->log_file_tail_offset < MAIL_TRANSACTION_LOG_HEADER_MIN_SIZE)
                        hdr->log_file_tail_offset = MAIL_TRANSACTION_LOG_HEADER_MIN_SIZE;
        } else {
                /* index's log_file_seq is newer than exists. move it to