if (last_dot) {
++last_dot;
- new_box = safe_malloc (maxlen + 1);
+ new_box = mem_malloc (maxlen + 1);
new_box[0] = box[0];
for (i = 1, j = 1; j < maxlen && i < len; ++i) {
if (strchr (SidebarBoundary, box[i])) {
#if USE_IMAP
int l = str_len (ImapHomeNamespace);
#endif
+ int l_m = str_len (Maildir);
if (SidebarWidth > COLS)
SidebarWidth = COLS;
box += l + 1;
else
#endif
+ if (l_m > 0 && str_ncmp (box, Maildir, l_m) == 0 &&
+ str_len (box) > l_m)
+ box += l_m + 1;
+ else
box = basename (box);
if (option (OPTSHORTENHIERARCHY) && str_len (box) > len-lencnt-1) {
addnstr (entry, len);
if (shortened)
- FREE(&box);
+ mem_free(&box);
return (1);
}