Commit d73acb77 d73acb77e032213ba2413b06ddfbb893f5633c2c by Sergey Poznyakoff

(mail_copy0): Make sure we really got the message.

1 parent c928a49a
......@@ -72,7 +72,16 @@ mail_copy0 (int argc, char **argv, int mark)
for (mp = msglist; mp; mp = mp->next)
{
mailbox_get_message (mbox, mp->msg_part[0], &msg);
int status;
status = mailbox_get_message (mbox, mp->msg_part[0], &msg);
if (status)
{
util_error ("can't get message %d: %s",
mp->msg_part[0],
mu_errstring (status));
break;
}
mailbox_append_message (mbx, msg);
message_size (msg, &size);
......