Skip to content

Commit

Permalink
parser/utils: fix check for relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
fabinsch committed Sep 7, 2022
1 parent db1f4e3 commit 8d6fd18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parsers/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ namespace pinocchio

const std::string separator("://");
const std::size_t pos_separator = string.find(separator);
bf::path string_path(string);

if (pos_separator != std::string::npos)
{
Expand Down Expand Up @@ -99,7 +100,7 @@ namespace pinocchio
throw std::invalid_argument(exception_message);
}
}
else if (string.substr(0,2).compare("./") == 0)
else if (string_path.is_relative())
{
// handle the case where a relative mesh path is specified without using //package
for (std::size_t i = 0; i < package_dirs.size(); ++i)
Expand Down

0 comments on commit 8d6fd18

Please sign in to comment.