break;
/* new */
case 'n':
+ if (!opt) {
+ snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
+ snprintf (dest, destlen, tmp, c ? Context->new : b->new);
+ } else if ((c && Context->new == 0) || (!c && b->new == 0))
+ opt = 0;
+ break;
+ /* unread */
+ case 'u':
if (!opt) {
snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
snprintf (dest, destlen, tmp, c ? Context->unread : b->msg_unread);
#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) {