From: Timo Sirainen Date: Fri, 20 Feb 2009 20:37:42 +0000 (-0500) Subject: imap-acl: Fixed GETACL when listing both negative and postitive rights. X-Git-Tag: 1.2.beta2~78 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34015eb0b74735f2fac07c12697bde20a94735e6;p=thirdparty%2Fdovecot%2Fcore.git imap-acl: Fixed GETACL when listing both negative and postitive rights. --HG-- branch : HEAD --- diff --git a/src/plugins/imap-acl/imap-acl-plugin.c b/src/plugins/imap-acl/imap-acl-plugin.c index e4f5abea27..63135adba4 100644 --- a/src/plugins/imap-acl/imap-acl-plugin.c +++ b/src/plugins/imap-acl/imap-acl-plugin.c @@ -173,11 +173,14 @@ static int imap_acl_write_aclobj(string_t *dest, struct acl_object *aclobj) tmp = t_str_new(128); iter = acl_object_list_init(aclobj); while ((ret = acl_object_list_next(iter, &rights)) > 0) { - str_append_c(dest, ' '); - if (rights.rights != NULL) + if (rights.rights != NULL) { + str_append_c(dest, ' '); imap_acl_write_right(dest, tmp, &rights, FALSE); - if (rights.neg_rights != NULL) + } + if (rights.neg_rights != NULL) { + str_append_c(dest, ' '); imap_acl_write_right(dest, tmp, &rights, TRUE); + } } acl_object_list_deinit(&iter); return ret;