Commit d74b5f53 d74b5f53991d83e0a3c34e8d898cce942981ccb8 by Sergey Poznyakoff

Minor fix.

* libmailutils/mailbox.c (mu_mailbox_open): Return MU_ERR_OPEN
if the mailbox has already been opened.
1 parent 756eb2bc
......@@ -298,6 +298,8 @@ mu_mailbox_open (mu_mailbox_t mbox, int flag)
return MU_ERR_MBX_NULL;
if (mbox->_open == NULL)
return MU_ERR_EMPTY_VFN;
if (mbox->flags & _MU_MAILBOX_OPEN)
return MU_ERR_OPEN;
if (flag & MU_STREAM_QACCESS)
{
/* Quick access mailboxes are read-only */
......