changeset 8789:d153c72800e0 HEAD

IMAP: Don't return APPENDUI/COPYUID if backend didn't provide them.
author Timo Sirainen <tss@iki.fi>
date Thu, 26 Feb 2009 18:27:17 -0500
parents 1f2dfc6fbda9
children 7224c45d4719
files src/imap/cmd-append.c src/imap/cmd-copy.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/cmd-append.c	Thu Feb 26 17:44:17 2009 -0500
+++ b/src/imap/cmd-append.c	Thu Feb 26 18:27:17 2009 -0500
@@ -259,7 +259,9 @@
 		}
 		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);
--- a/src/imap/cmd-copy.c	Thu Feb 26 17:44:17 2009 -0500
+++ b/src/imap/cmd-copy.c	Thu Feb 26 18:27:17 2009 -0500
@@ -155,6 +155,8 @@
 	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.",