]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap-acl: Fixed GETACL when listing both negative and postitive rights.
authorTimo Sirainen <tss@iki.fi>
Fri, 20 Feb 2009 20:37:42 +0000 (15:37 -0500)
committerTimo Sirainen <tss@iki.fi>
Fri, 20 Feb 2009 20:37:42 +0000 (15:37 -0500)
--HG--
branch : HEAD

src/plugins/imap-acl/imap-acl-plugin.c

index e4f5abea27215e9d4927cc399f61ffe963b0b8ea..63135adba4737a2457a3858358e06f343353a5a3 100644 (file)
@@ -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;