Commit b8650926 b8650926df468289f0a63b90904f3674e3b1f0dc by Sergey Poznyakoff

(imap4d_copy0): Minor improvement

1 parent 12bf6a1a
......@@ -93,8 +93,8 @@ imap4d_copy0 (char *arg, int isuid, char *resp, size_t resplen)
{
message_t msg = NULL;
size_t msgno = (isuid) ? uid_to_msgno (set[i]) : set[i];
mailbox_get_message (mbox, msgno, &msg);
mailbox_append_message (cmbox, msg);
if (msgno && mailbox_get_message (mbox, msgno, &msg) == 0)
mailbox_append_message (cmbox, msg);
}
mailbox_close (cmbox);
}
......
......@@ -214,7 +214,9 @@ imap4d_fetch0 (char *arg, int isuid, char *resp, size_t resplen)
util_send (")\r\n");
free (p);
}
else
else if (!isuid)
/* According to RFC 3501, "A non-existent unique identifier is
ignored without any error message generated." */
{
snprintf (resp, resplen,
"Bogus message set: message number out of range");
......