dovecot-2.2: pop3c: Don't assert-crash when trying to list subsc...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jun 12 16:27:54 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/09ac72cdfa8e
changeset: 16493:09ac72cdfa8e
user: Timo Sirainen <tss at iki.fi>
date: Wed Jun 12 16:27:47 2013 +0300
description:
pop3c: Don't assert-crash when trying to list subscriptions.
diffstat:
src/lib-storage/list/mailbox-list-subscriptions.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (17 lines):
diff -r 7a7d4d8123d5 -r 09ac72cdfa8e src/lib-storage/list/mailbox-list-subscriptions.c
--- a/src/lib-storage/list/mailbox-list-subscriptions.c Wed Jun 12 16:20:19 2013 +0300
+++ b/src/lib-storage/list/mailbox-list-subscriptions.c Wed Jun 12 16:27:47 2013 +0300
@@ -126,8 +126,11 @@
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 */
More information about the dovecot-cvs
mailing list