Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2255:dfb728afc8a3 HEAD
no_partial_rewrite was incorrectly set always
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 29 Jun 2004 16:18:21 +0300 |
parents | 4b24a962ef89 |
children | 93856e13e020 |
files | src/lib-storage/index/mbox/mbox-sync-parse.c |
diffstat | 1 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync-parse.c Tue Jun 29 16:10:52 2004 +0300 +++ b/src/lib-storage/index/mbox/mbox-sync-parse.c Tue Jun 29 16:18:21 2004 +0300 @@ -382,18 +382,20 @@ line_start_pos = str_len(ctx->header); str_append(ctx->header, hdr->name); str_append(ctx->header, ": "); - } - if (ctx->header_first_change == (size_t)-1 && - hdr->full_value_offset != str_len(ctx->header)) { - /* whitespaces around ':' are non-standard. either - there's whitespace before ':' or none after. - if we're going to rewrite this message, we can't - do it partially from here after as offsets won't - match. this shouldn't happen pretty much ever, so - don't try to optimize this - just rewrite the whole - thing. */ - ctx->no_partial_rewrite = TRUE; + if (ctx->header_first_change == (size_t)-1 && + hdr->full_value_offset - hdr->name_offset != + str_len(ctx->header) - line_start_pos) { + /* whitespaces around ':' are non-standard. + either there's whitespace before ':' or none + after. if we're going to rewrite this + message, we can't do it partially from here + after as offsets won't match. this shouldn't + happen pretty much ever, so don't try to + optimize this - just rewrite the whole + thing. */ + ctx->no_partial_rewrite = TRUE; + } } func = header_func_find(hdr->name);