summaryrefslogtreecommitdiffstats
path: root/sync/engine/commit_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sync/engine/commit_util.cc')
-rw-r--r--sync/engine/commit_util.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sync/engine/commit_util.cc b/sync/engine/commit_util.cc
index 36b7c06..ad29e4f 100644
--- a/sync/engine/commit_util.cc
+++ b/sync/engine/commit_util.cc
@@ -128,7 +128,10 @@ void BuildCommitItem(
} else {
new_parent_id = meta_entry.GetParentId();
}
- sync_entry->set_parent_id_string(SyncableIdToProto(new_parent_id));
+
+ if (meta_entry.ShouldMaintainHierarchy()) {
+ sync_entry->set_parent_id_string(SyncableIdToProto(new_parent_id));
+ }
// If our parent has changed, send up the old one so the server
// can correctly deal with multiple parents.