diff options
author | Brendan Cully <brendan@kublai.com> | 2007-03-12 10:32:35 -0700 |
---|---|---|
committer | Brendan Cully <brendan@kublai.com> | 2007-03-12 10:32:35 -0700 |
commit | a7847127e47ac3d6e1ff0d49efdb199d08e0eb3c (patch) | |
tree | 24ee76e2abbfe6e9bbd56a06160443da9ee1d7f0 /imap | |
parent | 1e1645b28dd864b405bf66676e664833d7836f32 (diff) |
Substitute INBOX for empty mailbox _after_ cleanup (closes: #2841)
Diffstat (limited to 'imap')
-rw-r--r-- | imap/util.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/imap/util.c b/imap/util.c index 6802bde3..b2e85dfc 100644 --- a/imap/util.c +++ b/imap/util.c @@ -295,12 +295,6 @@ char *imap_fix_path (IMAP_DATA *idata, char *mailbox, char *path, { int x = 0; - if (!mailbox || !*mailbox) - { - strfcpy (path, "INBOX", plen); - return path; - } - while (mailbox && *mailbox && (x < (plen - 1))) { if ((*mailbox == '/') || (*mailbox == idata->delim)) @@ -318,6 +312,10 @@ char *imap_fix_path (IMAP_DATA *idata, char *mailbox, char *path, if (x && path[--x] != idata->delim) x++; path[x] = '\0'; + + if (!path[0]) + strfcpy (path, "INBOX", plen); + return path; } |