changeset 12639:96c284f7548f

lib-storage: Crashfix to layout=fs.
author Timo Sirainen <tss@iki.fi>
date Tue, 08 Feb 2011 00:06:28 +0200
parents 951d89021e5f
children 19ffd1889f40
files src/lib-storage/list/mailbox-list-fs-iter.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/list/mailbox-list-fs-iter.c	Sat Feb 05 04:43:49 2011 +0200
+++ b/src/lib-storage/list/mailbox-list-fs-iter.c	Tue Feb 08 00:06:28 2011 +0200
@@ -388,8 +388,10 @@
 	    (ctx->info.flags & MAILBOX_NONEXISTENT) != 0)
 		return NULL;
 
-	mailbox_list_set_subscription_flags(ctx->ctx.list, "INBOX",
-					    &ctx->info.flags);
+	if ((ctx->ctx.flags & MAILBOX_LIST_ITER_RETURN_SUBSCRIBED) != 0) {
+		mailbox_list_set_subscription_flags(ctx->ctx.list, "INBOX",
+						    &ctx->info.flags);
+	}
 	inbox_flags_set(ctx);
 	/* we got here because we didn't see INBOX among other mailboxes,
 	   which means it has no children. */
@@ -569,8 +571,10 @@
 		return 1;
 	}
 
-	mailbox_list_set_subscription_flags(ctx->ctx.list, list_path,
-					    &ctx->info.flags);
+	if ((ctx->ctx.flags & MAILBOX_LIST_ITER_RETURN_SUBSCRIBED) != 0) {
+		mailbox_list_set_subscription_flags(ctx->ctx.list, list_path,
+						    &ctx->info.flags);
+	}
 
 	/* make sure we give only one correct INBOX */
 	if ((ns->flags & NAMESPACE_FLAG_INBOX_USER) != 0) {