From 02b5e6ea7ba068294cd1b7c7e90c45d45c36e718 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Wed, 21 Jun 2000 11:50:59 +0000 Subject: [PATCH] Fix another bug in mbox synching. --- mbox.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mbox.c b/mbox.c index 897e1bd6..dab5f155 100644 --- a/mbox.c +++ b/mbox.c @@ -775,6 +775,17 @@ int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint) for (i = first, j = 0; i < ctx->msgcount; i++) { + /* + * back up some information which is needed to restore offsets when + * something fails. + */ + + oldOffset[i-first].valid = 1; + oldOffset[i-first].hdr = ctx->hdrs[i]->offset; + oldOffset[i-first].body = ctx->hdrs[i]->content->offset; + oldOffset[i-first].lines = ctx->hdrs[i]->lines; + oldOffset[i-first].length = ctx->hdrs[i]->content->length; + if (! ctx->hdrs[i]->deleted) { j++; @@ -804,17 +815,6 @@ int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint) } } - /* - * back up some information which is needed to restore offsets when - * something fails. - */ - - oldOffset[i-first].valid = 1; - oldOffset[i-first].hdr = ctx->hdrs[i]->offset; - oldOffset[i-first].body = ctx->hdrs[i]->content->offset; - oldOffset[i-first].lines = ctx->hdrs[i]->lines; - oldOffset[i-first].length = ctx->hdrs[i]->content->length; - /* save the new offset for this message. we add `offset' because the * temporary file only contains saved message which are located after * `offset' in the real mailbox -- 2.40.0