From: ak1 Date: Thu, 15 Sep 2005 19:30:48 +0000 (+0000) Subject: Andreas Krennmair: X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=e25811a4e3b78d25ccffcbe272b31d625138c61e;p=apps%2Fmadmutt.git Andreas Krennmair: correctly handle Maildir with and without trailing slash when printing sidebar entries. git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@528 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/VERSION.svn b/VERSION.svn index 678dee3..9dbddfa 100644 --- a/VERSION.svn +++ b/VERSION.svn @@ -1 +1 @@ -527 +528 diff --git a/sidebar.c b/sidebar.c index 57043ba..4ea49d4 100644 --- a/sidebar.c +++ b/sidebar.c @@ -217,9 +217,12 @@ int make_sidebar_entry (char* box, int idx, size_t len) else #endif if (l_m > 0 && str_ncmp (box, Maildir, l_m) == 0 && - str_len (box) > l_m) + str_len (box) > l_m) { box += l_m; - else + if (Maildir[strlen(Maildir)-1]!='/') { + box += 1; + } + } else box = basename (box); if (option (OPTSHORTENHIERARCHY) && str_len (box) > len-lencnt-1) {