dir->info_flags |= MAILBOX_SELECT;
return 0;
}
- if (strcmp(d->d_name, ctx->ctx.list->set.subscription_fname) == 0) {
+ if (ctx->ctx.list->set.subscription_fname != NULL &&
+ strcmp(d->d_name, ctx->ctx.list->set.subscription_fname) == 0) {
/* if this is the subscriptions file, skip it */
root_dir = mailbox_list_get_root_forced(ctx->ctx.list,
MAILBOX_LIST_PATH_TYPE_DIR);
enum mailbox_list_path_type type;
const char *path;
+ if (_list->set.subscription_fname == NULL) {
+ mailbox_list_set_error(_list, MAIL_ERROR_NOTPOSSIBLE,
+ "Subscriptions not supported");
+ return -1;
+ }
+
type = _list->set.control_dir != NULL ?
MAILBOX_LIST_PATH_TYPE_CONTROL : MAILBOX_LIST_PATH_TYPE_DIR;
struct index_mailbox_list *list = (struct index_mailbox_list *)_list;
const char *path;
+ if (_list->set.subscription_fname == NULL) {
+ mailbox_list_set_error(_list, MAIL_ERROR_NOTPOSSIBLE,
+ "Subscriptions not supported");
+ return -1;
+ }
+
path = t_strconcat(_list->set.control_dir != NULL ?
_list->set.control_dir : _list->set.root_dir,
"/", _list->set.subscription_fname, NULL);
(struct maildir_mailbox_list *)_list;
const char *path;
+ if (_list->set.subscription_fname == NULL) {
+ mailbox_list_set_error(_list, MAIL_ERROR_NOTPOSSIBLE,
+ "Subscriptions not supported");
+ return -1;
+ }
+
path = t_strconcat(_list->set.control_dir != NULL ?
_list->set.control_dir : _list->set.root_dir,
"/", _list->set.subscription_fname, NULL);
type = src_list->set.control_dir != NULL ?
MAILBOX_LIST_PATH_TYPE_CONTROL : MAILBOX_LIST_PATH_TYPE_DIR;
- if (!mailbox_list_get_root_path(src_list, type, &path)) {
+ if (!mailbox_list_get_root_path(src_list, type, &path) ||
+ src_list->set.subscription_fname == NULL) {
/* no subscriptions (e.g. pop3c) */
return 0;
}