Index: sync/internal_api/write_node.cc |
diff --git a/sync/internal_api/write_node.cc b/sync/internal_api/write_node.cc |
index f3852b0f51b5cea1d40088ce3952843e4f476151..825e2eda0fd82f1b9200b396f0642fcce55ef00e 100644 |
--- a/sync/internal_api/write_node.cc |
+++ b/sync/internal_api/write_node.cc |
@@ -385,8 +385,8 @@ WriteNode::InitUniqueByCreationResult WriteNode::InitUniqueByCreationImpl( |
// We don't support directory and tag combinations. |
entry_->PutIsDir(false); |
- if (!parent_id.IsNull()) { |
- if (!PutPredecessor(NULL)) |
+ if (entry_->ShouldMaintainPosition()) { |
+ if (!entry_->PutPredecessor(syncable::Id())) |
return INIT_FAILED_SET_PREDECESSOR; |
} |