Index: src/libchcore/TConfig.cpp =================================================================== diff -u -N -r5fd6beaad9f1eccb664b997d151acb59961e4827 -r2ddc2ce53281e95e7571d8ad6232020b74a03429 --- src/libchcore/TConfig.cpp (.../TConfig.cpp) (revision 5fd6beaad9f1eccb664b997d151acb59961e4827) +++ src/libchcore/TConfig.cpp (.../TConfig.cpp) (revision 2ddc2ce53281e95e7571d8ad6232020b74a03429) @@ -586,10 +586,22 @@ void TConfig::SetValue(PCTSTR pszPropName, const TStringArray& rvValues) { + // get rid of the last part of the property to get to the parent holding the real entries + std::wstring wstrNewPropName; + std::wstring wstrPropertyName = pszPropName; + boost::iterator_range iterFnd = boost::find_last(wstrPropertyName, _T(".")); + if(iterFnd.begin() != wstrPropertyName.end()) + wstrNewPropName.insert(wstrNewPropName.end(), wstrPropertyName.begin(), iterFnd.begin()); + else + wstrNewPropName = pszPropName; + // separate scope for mutex (to avoid calling notifier inside critical section) { boost::unique_lock lock(m_lock); - m_propTree.erase(pszPropName); + + boost::optional children = m_propTree.get_child_optional(wstrNewPropName); + if(children.is_initialized()) + children.get().clear(); for(size_t stIndex = 0; stIndex < rvValues.GetCount(); ++stIndex) { m_propTree.add(pszPropName, (const wchar_t*)rvValues.GetAt(stIndex));