X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sidebar.c;h=4ea49d4ae17ec5ac28ef06959e48fdb425dfbffc;hp=a9b0788694978a80964dfd9ab4de01f9eeee2cc1;hb=48d5c7532ee9fdfb5d1d06483ef6bf8e3b09891d;hpb=60f4017cfee7116f7945c2945965c0537570a3d3 diff --git a/sidebar.c b/sidebar.c index a9b0788..4ea49d4 100644 --- a/sidebar.c +++ b/sidebar.c @@ -213,13 +213,16 @@ int make_sidebar_entry (char* box, int idx, size_t len) #if USE_IMAP if (l > 0 && str_ncmp (box, ImapHomeNamespace, l) == 0 && str_len (box) > l) - box += l + 1; + box += l + 1; /* we're trimming the ImapHomeNamespace, the "+ 1" is for the separator */ else #endif if (l_m > 0 && str_ncmp (box, Maildir, l_m) == 0 && - str_len (box) > l_m) - box += l_m + 1; - else + str_len (box) > l_m) { + box += l_m; + if (Maildir[strlen(Maildir)-1]!='/') { + box += 1; + } + } else box = basename (box); if (option (OPTSHORTENHIERARCHY) && str_len (box) > len-lencnt-1) {