]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3c: Don't assert-crash when trying to list subscriptions.
authorTimo Sirainen <tss@iki.fi>
Wed, 12 Jun 2013 13:27:47 +0000 (16:27 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 12 Jun 2013 13:27:47 +0000 (16:27 +0300)
src/lib-storage/list/mailbox-list-subscriptions.c

index b32c07d968280ea6ddde7e82890adeb2b08ba76d..28174fec13448c0d41fec0c672187828185aa501 100644 (file)
@@ -126,8 +126,11 @@ int mailbox_list_subscriptions_refresh(struct mailbox_list *src_list,
 
        type = src_list->set.control_dir != NULL ?
                MAILBOX_LIST_PATH_TYPE_CONTROL : MAILBOX_LIST_PATH_TYPE_DIR;
-       path = t_strconcat(mailbox_list_get_root_forced(src_list, type),
-                          "/", src_list->set.subscription_fname, NULL);
+       if (!mailbox_list_get_root_path(src_list, type, &path)) {
+               /* no subscriptions (e.g. pop3c) */
+               return 0;
+       }
+       path = t_strconcat(path, "/", src_list->set.subscription_fname, NULL);
        if (stat(path, &st) < 0) {
                if (errno == ENOENT) {
                        /* no subscriptions */