]> granicus.if.org Git - neomutt/commitdiff
Don't lose N flag when uploading a message to an IMAP mailbox.
authorDan Hopper <ku4nf@austin.rr.com>
Sun, 27 Feb 2005 02:44:45 +0000 (02:44 +0000)
committerDan Hopper <ku4nf@austin.rr.com>
Sun, 27 Feb 2005 02:44:45 +0000 (02:44 +0000)
(Slightly modified from the original patch to prevent spurious space
characters).

imap/message.c

index 7b39c06de6139f26c14ca45c6f903760cc17a0a3..f20e16caedeaf77f3462e627bbeb9810d85a8fb9 100644 (file)
@@ -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);