From c6ca8191a40f8c3cbc63d49d398a14a898387e04 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 26 Feb 2009 18:27:17 -0500 Subject: [PATCH] IMAP: Don't return APPENDUI/COPYUID if backend didn't provide them. --HG-- branch : HEAD --- src/imap/cmd-append.c | 4 +++- src/imap/cmd-copy.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/imap/cmd-append.c b/src/imap/cmd-append.c index 8eb245a990..8042e55d7c 100644 --- a/src/imap/cmd-append.c +++ b/src/imap/cmd-append.c @@ -259,7 +259,9 @@ static bool cmd_append_continue_parsing(struct client_command_context *cmd) } i_assert(ctx->count == uid2 - uid1 + 1); - if (uid1 == uid2) { + if (uid1 == 0) + msg = "OK Append completed."; + else if (uid1 == uid2) { msg = t_strdup_printf("OK [APPENDUID %u %u] " "Append completed.", uid_validity, uid1); diff --git a/src/imap/cmd-copy.c b/src/imap/cmd-copy.c index 1180e132ab..97882cbccf 100644 --- a/src/imap/cmd-copy.c +++ b/src/imap/cmd-copy.c @@ -155,6 +155,8 @@ bool cmd_copy(struct client_command_context *cmd) else { i_assert(copy_count == uid2 - uid1 + 1); + if (uid1 == 0) + msg = "OK Copy completed."; if (uid1 == uid2) { msg = t_strdup_printf("OK [COPYUID %u %s %u] " "Copy completed.", -- 2.47.3