From: Brendan Cully Date: Mon, 12 Mar 2007 17:32:35 +0000 (-0700) Subject: Substitute INBOX for empty mailbox _after_ cleanup (closes: #2841) X-Git-Tag: mutt-1-5-15-rel~47^2~18^2~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7847127e47ac3d6e1ff0d49efdb199d08e0eb3c;p=mutt Substitute INBOX for empty mailbox _after_ cleanup (closes: #2841) --- 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; }