Commit c8654e71 c8654e715d0ffbb8b1c18bf9e6511f234af638cd by Sergey Poznyakoff

(mailbox_create_default): If the

mailbox name does not start with a '/' and does not contain
a protocol specification, assume it is a file name relative
to the cwd and convert it to the absolute file name.
1 parent 83d26a70
......@@ -298,16 +298,30 @@ mailbox_create_default (mailbox_t *pmbox, const char *mail)
case '%':
status = percent_expand (mail, &mbox);
break;
case '~':
status = tilde_expand (mail, &mbox);
break;
case '+':
case '=':
status = plus_expand (mail, &mbox);
break;
default:
case '/':
mbox = strdup (mail);
break;
default:
if (!strchr (mail, ':'))
{
tmp_mbox = mu_getcwd();
mbox = malloc (strlen (tmp_mbox) + strlen (mail) + 2);
sprintf (mbox, "%s/%s", tmp_mbox, mail);
}
else
mbox = strdup (mail);
break;
}
if (tmp_mbox)
......