This replaces mail_storage.lost_mailbox_prefix.
"but could not recover mailbox name",
guid_128_to_string(box->guid), path);
box_name = t_strdup_printf("%s%s",
- ctx->storage->lost_mailbox_prefix,
- guid_128_to_string(box->guid));
+ ctx->storage->set->mailbox_list_lost_mailbox_prefix,
+ guid_128_to_string(box->guid));
}
return box_name;
}
}
/* we'll need to delete one of these entries. if one of them begins with
"lost-", remove it. otherwise just pick one of them randomly. */
- if (strncmp(box->name, ctx->storage->lost_mailbox_prefix,
- strlen(ctx->storage->lost_mailbox_prefix)) == 0) {
+ if (strncmp(box->name, ctx->storage->set->mailbox_list_lost_mailbox_prefix,
+ strlen(ctx->storage->set->mailbox_list_lost_mailbox_prefix)) == 0) {
delete_name = box->name;
keep_name = rebuild_box->index_name;
} else {
#define MAIL_SHARED_STORAGE_NAME "shared"
-#define MAIL_STORAGE_LOST_MAILBOX_PREFIX "recovered-lost-folder-"
-
enum mail_storage_list_index_rebuild_reason {
/* Mailbox list index was found to be corrupted. */
MAIL_STORAGE_LIST_INDEX_REBUILD_REASON_CORRUPTED,
* uniqueness checking (via strcmp) and never used as a path. */
const char *unique_root_dir;
- /* prefix for lost mailbox */
- const char *lost_mailbox_prefix;
-
/* Last error set in mail_storage_set_critical(). */
char *last_internal_error;
char *last_internal_error_mailbox;
DEF(BOOL_HIDDEN, mailbox_list_utf8),
DEF(STR, mailbox_list_visible_escape_char),
DEF(STR, mailbox_list_storage_escape_char),
+ DEF(STR_HIDDEN, mailbox_list_lost_mailbox_prefix),
DEF(STR_HIDDEN, mailbox_directory_name),
DEF(BOOL, mailbox_directory_name_legacy),
DEF(STR_HIDDEN, mailbox_root_directory_name),
.mailbox_list_utf8 = FALSE,
.mailbox_list_visible_escape_char = "",
.mailbox_list_storage_escape_char = "",
+ .mailbox_list_lost_mailbox_prefix = "recovered-lost-folder-",
.mailbox_directory_name = "",
.mailbox_directory_name_legacy = TRUE,
.mailbox_root_directory_name = "",
bool mailbox_list_utf8;
const char *mailbox_list_visible_escape_char;
const char *mailbox_list_storage_escape_char;
+ const char *mailbox_list_lost_mailbox_prefix;
const char *mailbox_directory_name;
bool mailbox_directory_name_legacy;
const char *mailbox_root_directory_name;
}
storage = storage_class->v.alloc();
- if (storage->lost_mailbox_prefix == NULL)
- storage->lost_mailbox_prefix = MAIL_STORAGE_LOST_MAILBOX_PREFIX;
storage->refcount = 1;
storage->storage_class = storage_class;
storage->user = ns->user;