(mail_copy0): Make sure we really got the message.
Showing
1 changed file
with
10 additions
and
1 deletions
... | @@ -72,7 +72,16 @@ mail_copy0 (int argc, char **argv, int mark) | ... | @@ -72,7 +72,16 @@ mail_copy0 (int argc, char **argv, int mark) |
72 | 72 | ||
73 | for (mp = msglist; mp; mp = mp->next) | 73 | for (mp = msglist; mp; mp = mp->next) |
74 | { | 74 | { |
75 | mailbox_get_message (mbox, mp->msg_part[0], &msg); | 75 | int status; |
76 | |||
77 | status = mailbox_get_message (mbox, mp->msg_part[0], &msg); | ||
78 | if (status) | ||
79 | { | ||
80 | util_error ("can't get message %d: %s", | ||
81 | mp->msg_part[0], | ||
82 | mu_errstring (status)); | ||
83 | break; | ||
84 | } | ||
76 | mailbox_append_message (mbx, msg); | 85 | mailbox_append_message (mbx, msg); |
77 | 86 | ||
78 | message_size (msg, &size); | 87 | message_size (msg, &size); | ... | ... |
-
Please register or sign in to post a comment