Skip to content
Commit a206fed2 authored by Harald Sitter's avatar Harald Sitter 🐧
Browse files

change the semantics of duplication

previously this would simply clone the shared pointer, but that leaves
references into the old tree behind which can then cause state confusion
(e.g. the asserts to do with m_parent consistency can fail). instead opt
for a deep-clone behavior. it's more expensive but also much much safer.

code is very exhaustive because we don't want to stack exhaust on
duplication so a recursive call won't do. instead we iterate down the
tree and then append all folders in reverse order.

add a test to ensure duplication works correctly

BUG: 463442
parent a7adaea7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment