* mutt_inbox_cmp("/foo/bar", "/foo/baz") --> 0
* mutt_inbox_cmp("/foo/bar/", "/foo/bar/inbox") --> 0
* mutt_inbox_cmp("/foo/bar/sent", "/foo/bar/inbox") --> 1
+ * mutt_inbox_cmp("=INBOX", "=Drafts") --> -1
*/
int mutt_inbox_cmp (const char *a, const char *b)
{
+ /* fast-track in case the paths have been mutt_pretty_mailbox'ified */
+ if (a[0] == '=' && b[0] == '=')
+ return (mutt_strcasecmp(a+1, "inbox") == 0) ? -1 :
+ (mutt_strcasecmp(b+1, "inbox") == 0) ? 1 : 0;
+
const char *a_end = strrchr (a, '/');
const char *b_end = strrchr (b, '/');