Open zhileiren opened 4 days ago
https://github.com/gazebosim/gz-common/blob/gz-common5/src/Filesystem.cc#L136
std::string common::absPath(const std::string &_path)
{
return fs::absolute(_path).string();
}
The root cause seems to be here, no empty check for _path, or shall it be fixed in the gz-sim repository?
https://github.com/gazebosim/gz-sim/blob/gz-sim8/src/ServerPrivate.cc#L489
bool ServerPrivate::ResourcePathsResolveService(
const msgs::StringMsg &_req,
msgs::StringMsg &_res)
{
// Get the request
std::string req = _req.data();
// return false for empty req?
// Handle the case where the request is already a valid path
if (common::exists(common::absPath(req)))
{
_res.set_data(common::absPath(req));
return true;
}
...
}
Environment
Description
Steps to reproduce:
Output
a.log