Commit 733fb106 733fb10654550d22f2a037cbf1f03bfd08868190 by Alain Magloire

* mail/mail.c: Be a little more verbose when mailbox_{create,open}()

       fails at startup.
       * doc/Makefile.am: Add the missing *.texi in the list of EXTRA_DIST.
1 parent bb67c666
2001-07-06 Alain Magloire
* mail/mail.c: Be a little more verbose when mailbox_{create,open}()
fails at startup.
* doc/Makefile.am: Add the missing *.texi in the list of EXTRA_DIST.
2001-07-06 Sergey Poznyakoff
* imap4d/fetch.c: imap4d_fetch0(): return RESP_OK on success.
* imap4d/bye.c: split imap4d_bye() into imap4d_bye() and imap4d_bye0().
......
......@@ -13,15 +13,27 @@ EXTRA_DIST = \
body.texi \
c-api.texi \
encoding.texi \
envelope.texi \
ex-address.texi \
framework.texi \
folder.texi \
headers.texi \
imap4.texi \
iterator.texi \
locker.texi \
mailbox.texi \
mailer.texi \
maildir.texi \
mbox.texi \
message.texi \
mh.texi \
nntp.texi \
parse822.texi \
pop3.texi \
programs.texi \
sendmail.texi \
sfrom.c.texi \
smtp.texi \
stream.texi \
url.texi \
version.texi
......
......@@ -318,16 +318,28 @@ main (int argc, char **argv)
if (args.file == NULL)
{
if (mailbox_create_default (&mbox, args.user) != 0)
exit (EXIT_FAILURE);
{
exit (EXIT_FAILURE);
util_error ("Can not create mailbox for %s", args.user);
}
}
else if (mailbox_create (&mbox, args.file) != 0)
exit (EXIT_FAILURE);
{
exit (EXIT_FAILURE);
util_error ("Can not create mailbox %s", args.file);
}
if (mailbox_open (mbox, MU_STREAM_RDWR) != 0)
exit (EXIT_FAILURE);
{
exit (EXIT_FAILURE);
util_error ("Can not open mailbox");
}
if (mailbox_messages_count (mbox, &total) != 0)
exit (EXIT_FAILURE);
{
exit (EXIT_FAILURE);
util_error ("Can not read mailbox");
}
if (strlen ("exist") == modelen && !strcmp ("exist", mode->value))
return (total < 1) ? 1 : 0;
......