message: Update to new path class, simplify logic
diff: #include "conduit_relay_io_hdf5.hpp"
  #endif
  +#include "axom/core/utilities/Path.hpp"
  +
  // Sidre headers
  #include "ListCollection.hpp"
  #include "MapCollection.hpp"
  #include "Buffer.hpp"
  #include "DataStore.hpp"
  -#include "SidreUtilities.hpp"
  namespace axom
  {
  @@ -2292,20 +2293,21 @@ Group* Group::walkPath(std::string& path, bool create_groups_in_path)
  {
  Group* group_ptr = this;
  - std::string::size_type pos = detail::find_exclusive(path, s_path_delimiter);
  - if(pos != std::string::npos)
  - {
  - std::vector<std::string> tokens = detail::split(path, s_path_delimiter, pos);
  - std::vector<std::string>::iterator stop = tokens.end() - 1;
  + const std::vector<std::string> path_parts = axom::utilities::Path(path, s_path_delimiter).parts();
  +
  + // Find stopping point (right before last part of path)
  + std::vector<std::string>::const_iterator stop = path_parts.end() - 1;
  // Navigate path down to desired Group
  - for(std::vector<std::string>::const_iterator iter = tokens.begin();
  + for(std::vector<std::string>::const_iterator iter = path_parts.begin();
  iter < stop;
  ++iter)
  {
  - SLIC_ASSERT_MSG(iter->size() > 0,
  - SIDRE_GROUP_LOG_PREPEND << "Empty name in provided path '"
  - << path << "'.");
  + if(*iter == "")
  + {
  + // skip empty names
  + continue;
  + }
  if(group_ptr->hasChildGroup(*iter))
  {
  @@ -2326,8 +2328,7 @@ Group* Group::walkPath(std::string& path, bool create_groups_in_path)
  group_ptr = nullptr;
  }
  }
  - path = tokens.back();
  - }
  + path = path_parts.back();
  return group_ptr;
  }
  @@ -2345,20 +2346,21 @@ const Group* Group::walkPath(std::string& path) const
  {
  const Group* group_ptr = this;
  - std::string::size_type pos = detail::find_exclusive(path, s_path_delimiter);
  - if(pos != std::string::npos)
  - {
  - std::vector<std::string> tokens = detail::split(path, s_path_delimiter, pos);
  - std::vector<std::string>::iterator stop = tokens.end() - 1;
  + const std::vector<std::string> path_parts = axom::utilities::Path(path, s_path_delimiter).parts();
  +
  + // Find stopping point (right before last part of path)
  + std::vector<std::string>::const_iterator stop = path_parts.end() - 1;
  // Navigate path down to desired Group
  - for(std::vector<std::string>::const_iterator iter = tokens.begin();
  + for(std::vector<std::string>::const_iterator iter = path_parts.begin();
  iter < stop;
  ++iter)
  {
  - SLIC_ASSERT_MSG(iter->size() > 0,
  - SIDRE_GROUP_LOG_PREPEND << "Empty name in provided path '"
  - << path << "'.");
  + if(*iter == "")
  + {
  + // skip empty names
  + continue;
  + }
  if(group_ptr->hasChildGroup(*iter))
  {
  @@ -2370,8 +2372,7 @@ const Group* Group::walkPath(std::string& path) const
  iter = stop;
  }
  }
  - path = tokens.back();
  - }
  + path = path_parts.back();
  return group_ptr;
  }
  