From baed8fb548d517e5e6d49e82aa21d28a6dd94f08 Mon Sep 17 00:00:00 2001 From: Dan Hopper Date: Sun, 27 Feb 2005 02:44:45 +0000 Subject: [PATCH] Don't lose N flag when uploading a message to an IMAP mailbox. (Slightly modified from the original patch to prevent spurious space characters). --- imap/message.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/imap/message.c b/imap/message.c index 7b39c06de..f20e16cae 100644 --- a/imap/message.c +++ b/imap/message.c @@ -556,9 +556,12 @@ int imap_append_message (CONTEXT *ctx, MESSAGE *msg) rewind (fp); imap_munge_mbox_name (mbox, sizeof (mbox), mailbox); - snprintf (buf, sizeof (buf), "APPEND %s (\\Seen%s%s) {%lu}", mbox, - msg->flags.replied ? " \\Answered" : "", - msg->flags.flagged ? " \\Flagged" : "", + snprintf (buf, sizeof (buf), "APPEND %s (%s%s%s%s%s) {%lu}", mbox, + msg->flags.read ? "\\Seen" : "", + msg->flags.read ? " " : "", + msg->flags.replied ? "\\Answered" : "", + msg->flags.replied ? " " : "", + msg->flags.flagged ? "\\Flagged" : "", (unsigned long) len); imap_cmd_start (idata, buf); -- 2.50.1