return TRUE;
return FALSE;
} else {
- return strcmp(ns->unexpanded_set->location,
+ return strcmp(ns->set->unexpanded_location,
SETTING_STRVAR_UNEXPANDED) == 0;
}
}
driver = t_strdup_until(ns->set->location, p);
storage->location = p_strdup(_storage->pool, ns->set->location);
storage->unexpanded_location =
- p_strdup(_storage->pool, ns->unexpanded_set->location);
+ p_strdup(_storage->pool, ns->set->unexpanded_location);
storage->storage_class_name = p_strdup(_storage->pool, driver);
if (mail_user_get_storage_class(_storage->user, driver) == NULL &&
.name = "",
.type = "private",
.separator = "",
- .prefix = "0",
- .location = "0fail::LAYOUT=none",
+ .prefix = "",
+ .location = "fail::LAYOUT=none",
+ .unexpanded_location = "0fail::LAYOUT=none",
.alias_for = NULL,
.inbox = FALSE,
bool uidl_format_ok;
char c;
+#ifndef CONFIG_BINARY
+ i_assert(set->mail_location[0] == SETTING_STRVAR_UNEXPANDED[0] ||
+ set->mail_location[0] == SETTING_STRVAR_EXPANDED[0]);
+ set->unexpanded_mail_location = set->mail_location;
+#endif
+
if (set->mailbox_idle_check_interval == 0) {
*error_r = "mailbox_idle_check_interval must not be 0";
return FALSE;
name = ns->prefix != NULL ? ns->prefix : "";
+#ifndef CONFIG_BINARY
+ i_assert(ns->location[0] == SETTING_STRVAR_UNEXPANDED[0] ||
+ ns->location[0] == SETTING_STRVAR_EXPANDED[0]);
+ ns->unexpanded_location = ns->location;
+#endif
+
if (ns->separator[0] != '\0' && ns->separator[1] != '\0') {
*error_r = t_strdup_printf("Namespace '%s': "
"Hierarchy separator must be only one character long",
enum file_lock_method parsed_lock_method;
enum fsync_mode parsed_fsync_mode;
+ const char *unexpanded_mail_location;
const char *const *parsed_mail_attachment_content_type_filter;
bool parsed_mail_attachment_exclude_inlined;
ARRAY(struct mailbox_settings *) mailboxes;
struct mail_user_settings *user_set;
+ const char *unexpanded_location;
};
/* <settings checks> */
enum mailbox_list_path_type type)
{
const struct mail_storage_settings *mail_set;
- const char *location = list->ns->unexpanded_set->location;
+ const char *location = list->ns->set->unexpanded_location;
struct mail_user *user = list->ns->user;
struct mailbox_list_settings set;
const char *p, *path, *error;
location++;
if (*location == '\0') {
- mail_set = mail_user_set_get_driver_settings(user->set_parser,
- user->set_info, user->unexpanded_set,
- &mail_storage_setting_parser_info);
- i_assert(mail_set != NULL);
- location = mail_set->mail_location;
+ mail_set = mail_user_set_get_storage_set(user);
+ location = mail_set->unexpanded_mail_location;
if (*location == SETTING_STRVAR_EXPANDED[0])
return "";
i_assert(*location == SETTING_STRVAR_UNEXPANDED[0]);