summaryrefslogtreecommitdiff
path: root/mail/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/file.c')
-rw-r--r--mail/file.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/mail/file.c b/mail/file.c
index 517a6b7db..bc94f130e 100644
--- a/mail/file.c
+++ b/mail/file.c
@@ -85,8 +85,17 @@ mail_file (int argc, char **argv)
if (!name)
return 1;
- if ((status = mu_mailbox_create (&newbox, name)) != 0
- || (status = mu_mailbox_open (newbox, MU_STREAM_RDWR)) != 0)
+ status = mu_mailbox_create (&newbox, name);
+ if (status)
+ {
+ mu_error(_("Cannot create mailbox %s: %s"), name,
+ mu_strerror (status));
+ free (name);
+ return 1;
+ }
+ mu_mailbox_attach_ticket (newbox);
+
+ if ((status = mu_mailbox_open (newbox, MU_STREAM_RDWR)) != 0)
{
mu_mailbox_destroy (&newbox);
mu_error(_("Cannot open mailbox %s: %s"), name, mu_strerror (status));
@@ -128,4 +137,3 @@ mail_file (int argc, char **argv)
}
return 1;
}
-

Return to:

Send suggestions and report system problems to the System administrator.