Skip to content

Commit

Permalink
Merge pull request #12324 from rwcarlsen/hit-find-norm
Browse files Browse the repository at this point in the history
fix missing path normalization in HIT Node::find
  • Loading branch information
permcody committed Oct 16, 2018
2 parents ffd8a4c + f6283a4 commit 69bda2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions framework/contrib/hit/parse.cc
Expand Up @@ -337,6 +337,7 @@ Node::findInner(const std::string & path, const std::string & prefix)
else
fullpath = prefix + "/" + child->path();

fullpath = pathNorm(fullpath);
if (fullpath == path)
return child;
else if (path.find(fullpath) == std::string::npos)
Expand Down
6 changes: 6 additions & 0 deletions unit/src/HitTests.C
Expand Up @@ -252,6 +252,12 @@ TEST(HitTests, ParseFields)
"foo",
"barbaz",
hit::Field::Kind::String},
{"path-normalize-find #12313",
"[foo][/bar]baz=42[][]",
"foo/bar/baz",
"42",
hit::Field::Kind::Int},

};

for (size_t i = 0; i < sizeof(cases) / sizeof(ValCase); i++)
Expand Down

0 comments on commit 69bda2b

Please sign in to comment.