(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.
Showing
1 changed file
with
14 additions
and
0 deletions
... | @@ -298,14 +298,28 @@ mailbox_create_default (mailbox_t *pmbox, const char *mail) | ... | @@ -298,14 +298,28 @@ mailbox_create_default (mailbox_t *pmbox, const char *mail) |
298 | case '%': | 298 | case '%': |
299 | status = percent_expand (mail, &mbox); | 299 | status = percent_expand (mail, &mbox); |
300 | break; | 300 | break; |
301 | |||
301 | case '~': | 302 | case '~': |
302 | status = tilde_expand (mail, &mbox); | 303 | status = tilde_expand (mail, &mbox); |
303 | break; | 304 | break; |
305 | |||
304 | case '+': | 306 | case '+': |
305 | case '=': | 307 | case '=': |
306 | status = plus_expand (mail, &mbox); | 308 | status = plus_expand (mail, &mbox); |
307 | break; | 309 | break; |
310 | |||
311 | case '/': | ||
312 | mbox = strdup (mail); | ||
313 | break; | ||
314 | |||
308 | default: | 315 | default: |
316 | if (!strchr (mail, ':')) | ||
317 | { | ||
318 | tmp_mbox = mu_getcwd(); | ||
319 | mbox = malloc (strlen (tmp_mbox) + strlen (mail) + 2); | ||
320 | sprintf (mbox, "%s/%s", tmp_mbox, mail); | ||
321 | } | ||
322 | else | ||
309 | mbox = strdup (mail); | 323 | mbox = strdup (mail); |
310 | break; | 324 | break; |
311 | } | 325 | } | ... | ... |
-
Please register or sign in to post a comment