Commit f426a43d f426a43db86d5e2ece970b3bf6ddaf50d84b9714 by Sam Roberts

Append to INBOX if an explicit path wasn't supplied.

1 parent 26c39af1
......@@ -889,9 +889,14 @@ imap_append_message0 (mailbox_t mailbox, message_t msg)
url_get_path (mailbox->url, NULL, 0, &n);
if (n == 0)
{
if (!(path = strdup ("INBOX")))
{
free (abuf);
return EINVAL;
return ENOMEM;
}
}
else
{
path = calloc (n + 1, sizeof (*path));
if (path == NULL)
{
......@@ -900,6 +905,7 @@ imap_append_message0 (mailbox_t mailbox, message_t msg)
}
url_get_path (mailbox->url, path, n + 1, NULL);
}
}
/* FIXME: we need to get the envelope_date and use it.
currently it is ignored. */
......@@ -970,7 +976,7 @@ imap_append_message0 (mailbox_t mailbox, message_t msg)
MAILBOX_DEBUG0 (m_imap->mailbox, MU_DEBUG_PROT, f_imap->buffer);
default:
/* mu_error ("imap_append: unknow state\n"); */
/* mu_error ("imap_append: unknown state\n"); */
break;
}
f_imap->state = IMAP_NO_STATE;
......