For namespaces prefixes with multiple hierarchical names, we shouldn't
send parents (i.e. first part/parts of the prefix) that are outside of syncing.
sep[0] = brain->hierarchy_sep; sep[1] = '\0';
while (dsync_mailbox_tree_iter_next(brain->local_tree_iter,
&full_name, &node)) {
+ if (node->ns == NULL) {
+ /* This node was created when adding a namespace prefix
+ to the tree that has multiple hierarchical names,
+ but the parent names don't belong to any synced
+ namespace. For example when syncing "-n Shared/user/"
+ so "Shared/" is skipped. Or if there is e.g.
+ "Public/files/" namespace prefix, but no "Public/"
+ namespace at all. */
+ continue;
+ }
+
T_BEGIN {
const char *const *parts;