Commit f8c3f170 authored by Matthieu Dorier's avatar Matthieu Dorier

corrected problem when multiple clients try to create a dataset with the same name

parent 05e9f54b
......@@ -164,7 +164,10 @@ DataSet DataSet::createDataSet(const std::string& name) {
auto new_dataset_impl = std::make_shared<DataSetImpl>(
m_impl->m_datastore, m_impl->m_level+1,
std::make_shared<std::string>(parent), name);
m_impl->m_datastore->createDataSet(m_impl->m_level+1, parent, name, new_dataset_impl->m_uuid);
bool b = m_impl->m_datastore->createDataSet(m_impl->m_level+1, parent, name, new_dataset_impl->m_uuid);
if(!b) {
return *find(name);
}
return DataSet(new_dataset_impl);
}
......
Markdown is supported
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