(imap4d_copy0): Minor improvement
Showing
2 changed files
with
5 additions
and
3 deletions
... | @@ -93,8 +93,8 @@ imap4d_copy0 (char *arg, int isuid, char *resp, size_t resplen) | ... | @@ -93,8 +93,8 @@ imap4d_copy0 (char *arg, int isuid, char *resp, size_t resplen) |
93 | { | 93 | { |
94 | message_t msg = NULL; | 94 | message_t msg = NULL; |
95 | size_t msgno = (isuid) ? uid_to_msgno (set[i]) : set[i]; | 95 | size_t msgno = (isuid) ? uid_to_msgno (set[i]) : set[i]; |
96 | mailbox_get_message (mbox, msgno, &msg); | 96 | if (msgno && mailbox_get_message (mbox, msgno, &msg) == 0) |
97 | mailbox_append_message (cmbox, msg); | 97 | mailbox_append_message (cmbox, msg); |
98 | } | 98 | } |
99 | mailbox_close (cmbox); | 99 | mailbox_close (cmbox); |
100 | } | 100 | } | ... | ... |
... | @@ -214,7 +214,9 @@ imap4d_fetch0 (char *arg, int isuid, char *resp, size_t resplen) | ... | @@ -214,7 +214,9 @@ imap4d_fetch0 (char *arg, int isuid, char *resp, size_t resplen) |
214 | util_send (")\r\n"); | 214 | util_send (")\r\n"); |
215 | free (p); | 215 | free (p); |
216 | } | 216 | } |
217 | else | 217 | else if (!isuid) |
218 | /* According to RFC 3501, "A non-existent unique identifier is | ||
219 | ignored without any error message generated." */ | ||
218 | { | 220 | { |
219 | snprintf (resp, resplen, | 221 | snprintf (resp, resplen, |
220 | "Bogus message set: message number out of range"); | 222 | "Bogus message set: message number out of range"); | ... | ... |
-
Please register or sign in to post a comment