Skip to content

Commit

Permalink
fixed topology file path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dusty-nv committed Aug 9, 2021
1 parent 7a1f961 commit f27cb53
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion c/poseNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,20 @@ poseNet* poseNet::Create( const commandLine& cmdLine )
// loadTopology
bool poseNet::loadTopology( const char* json_path, Topology* topology )
{
const std::string path = locateFile(json_path);

if( path.length() == 0 )
{
LogError(LOG_TRT "poseNet -- failed to find topology file %s\n", json_path);
return false;
}

// load the json
nlohmann::json topology_json;

try
{
std::ifstream topology_file(json_path);
std::ifstream topology_file(path.c_str());
topology_file >> topology_json;
}
catch (...)
Expand Down

0 comments on commit f27cb53

Please sign in to comment.