summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mailbox/mailbox.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mailbox/mailbox.c b/mailbox/mailbox.c
index 894845b55..6b17e44a9 100644
--- a/mailbox/mailbox.c
+++ b/mailbox/mailbox.c
@@ -52,7 +52,16 @@ mailbox_folder_create (mu_mailbox_t mbox, const char *name,
char *fname;
if ((rc = mu_url_aget_path (mbox->url, &fname)))
- return rc;
+ {
+ if (rc == MU_ERR_NOENT)
+ {
+ fname = strdup (mu_url_to_string (mbox->url));
+ if (!fname)
+ return ENOMEM;
+ }
+ else
+ return rc;
+ }
if (mu_url_is_scheme (mbox->url, "file")
|| mu_url_is_scheme (mbox->url, "mbox")

Return to:

Send suggestions and report system problems to the System administrator.