From: Thomas Roessler Date: Tue, 31 Jul 2001 12:28:19 +0000 (+0000) Subject: More MH fixes. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72470f9e44b9e8ca55969a695873068ea8424c08;p=neomutt More MH fixes. --- diff --git a/mh.c b/mh.c index 0affb5b02..b3229c9de 100644 --- a/mh.c +++ b/mh.c @@ -868,12 +868,10 @@ int maildir_commit_message (CONTEXT *ctx, MESSAGE *msg, HEADER *hdr) /* * commit a message to an MH folder. * - * Essentially the same as the maildir case, but we don't have - * to care about flags. - * */ -int mh_commit_message (CONTEXT *ctx, MESSAGE *msg, HEADER *hdr) + +static int _mh_commit_message (CONTEXT *ctx, MESSAGE *msg, HEADER *hdr, short updseq) { DIR *dirp; struct dirent *de; @@ -938,11 +936,17 @@ int mh_commit_message (CONTEXT *ctx, MESSAGE *msg, HEADER *hdr) return -1; } } - - mh_sequences_add_one (ctx, hi, !msg->flags.read, msg->flags.flagged, msg->flags.replied); + if (updseq) + mh_sequences_add_one (ctx, hi, !msg->flags.read, msg->flags.flagged, msg->flags.replied); return 0; } +int mh_commit_message (CONTEXT *ctx, MESSAGE *msg, HEADER *hdr) +{ + return _mh_commit_message (ctx, msg, hdr, 1); +} + + /* Sync a message in an MH folder. * * This code is also used for attachment deletion in maildir @@ -976,7 +980,7 @@ static int mh_rewrite_message (CONTEXT *ctx, int msgno) if (ctx->magic == M_MAILDIR) rc = maildir_commit_message (ctx, dest, h); else - rc = mh_commit_message (ctx, dest, h); + rc = _mh_commit_message (ctx, dest, h, 0); mx_close_message (&dest);