mailbox_list_set_get_root_path(..., MAILBOX_LIST_PATH_TYPE_ALT_MAILBOX, ...)
must return one of three values:
1. if there is no alt storage, return NULL
2. if there is alt storage and MAILBOXDIR is set,
return ${alt_dir}/${mailbox_dir_name}
3. if there is alt storage but MAILBOXDIR is not set, return ${alt_dir}
Case number 3 was broken, and it mistakenly returned ${root_dir} - in other
words, it behaved as MAILBOX_LIST_PATH_TYPE_MAILBOX.
This correction changes the behavior, but this shouldn't cause
incompatibilities since:
1. it affects only storages that support alternate storage
2. it affects only configurations that use empty MAILBOXDIR
The only storage that supports alternate storage setting is dbox but dbox
defaults to MAILBOXDIR=mailboxes. Additionally, it appears to be impossible
to override it to an empty string (setting it to an empty strings causes
dbox to override it with the default - "mailboxes"). Therefore, nobody
should be affected by this change.
break;
case MAILBOX_LIST_PATH_TYPE_ALT_MAILBOX:
if (*set->mailbox_dir_name == '\0')
- path = set->root_dir;
+ path = set->alt_dir;
else if (set->alt_dir != NULL) {
path = t_strconcat(set->alt_dir, "/",
set->mailbox_dir_name, NULL);