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) ...@@ -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);
......