On 28.10.2008, Bernhard Herzog wrote:
>  - List with "%" doesn't list all intermediate mailboxes.
>
>    On the one hand arthur sees this:
>
>      x LIST "" "*"
>      ...
>      * LIST (\Noselect \HasChildren) "/" "users/ford"
>      * LIST (\HasNoChildren) "/" "users/ford/INBOX/hhgttg"
>      x OK List completed.
>
>    OTOH, with "%" only this:
>
>      x LIST "" "users/ford/%"
>      x OK List completed.

I've looked into this.  The problem is that acl_mailbox_list_info_is_visible 
in src/plugins/acl/acl-mailbox-list.c considers nonexistent mailboxes as not 
visible.  The attached patch fixes that for me.  I'm not sure it really is 
the right fix, though.  Maybe it would cause some mailboxes to be listed even 
though they shouldn't.

There's one thing about acl_mailbox_list_info_is_visible and struct 
acl_mailbox_list_iterate_context that I don't understand.  What's the member 
struct mailbox_info info; used for?

Regards,

   Bernhard

-- 
Bernhard Herzog  |  ++49-541-335 08 30  |  http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
diff -r 7c615ac48711 src/plugins/acl/acl-mailbox-list.c
--- a/src/plugins/acl/acl-mailbox-list.c	Thu Oct 30 17:41:02 2008 +0200
+++ b/src/plugins/acl/acl-mailbox-list.c	Fri Oct 31 12:43:38 2008 +0100
@@ -187,6 +187,9 @@ acl_mailbox_list_info_is_visible(struct 
 		/* skip ACL checks. */
 		return 1;
 	}
+
+	if ((info->flags & MAILBOX_NONEXISTENT) != 0)
+		return 1;
 
 	acl_name = acl_mailbox_list_iter_get_name(&ctx->ctx, info->name);
 	ret = acl_mailbox_list_have_right(ctx->ctx.list, acl_name,

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to