]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Fixed matching namespace for the namespace prefix itself.
authorTimo Sirainen <tss@iki.fi>
Mon, 24 Mar 2014 18:07:03 +0000 (19:07 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 24 Mar 2014 18:07:03 +0000 (19:07 +0100)
src/doveadm/dsync/dsync-brain-mailbox-tree.c

index 289544e3e804a072de29652bd8dd1ad19410bad5..f9bcc7f9140585bd2a2d64e5c236e744db109e45 100644 (file)
@@ -135,7 +135,15 @@ dsync_namespace_match_parts(struct mail_namespace *ns,
                        return FALSE;
                prefix += part_len + 1;
        }
-       return *name_parts != NULL;
+       if (*name_parts != NULL) {
+               /* namespace prefix found with a mailbox */
+               return TRUE;
+       }
+       if (*prefix == '\0') {
+               /* namespace prefix itself matched */
+               return TRUE;
+       }
+       return FALSE;
 }
 
 static struct mail_namespace *