X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=imap%2Fmessage.c;h=e7e7a17368cb459684821121a18a8bf5bda02653;hp=96d7e229af629885eb201fe502d862cc1f1c129d;hb=c7ceecd31e97891dd5cf48536d4bddf2c1d7d9dd;hpb=5c310cabcfafe551dcad7638c007daae1c7d3710 diff --git a/imap/message.c b/imap/message.c index 96d7e22..e7e7a17 100644 --- a/imap/message.c +++ b/imap/message.c @@ -562,9 +562,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 || msg->flags.flagged) ? " " : "", + msg->flags.replied ? "\\Answered" : "", + msg->flags.replied && msg->flags.flagged ? " " : "", + msg->flags.flagged ? "\\Flagged" : "", (unsigned long) len); imap_cmd_start (idata, buf); @@ -928,7 +931,6 @@ static size_t imap_hcache_keylen (const char *fn) static int msg_fetch_header_fetch (CONTEXT* ctx, IMAP_HEADER* h, char* buf, FILE* fp) { IMAP_DATA* idata; - long bytes; int rc = -1; /* default now is that string isn't FETCH response*/ idata = (IMAP_DATA*) ctx->data;