Skip to content

Commit

Permalink
Util: Use public API from libsdformat for detecting non-file source
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Cousineau <eric.cousineau@tri.global>
  • Loading branch information
EricCousineau-TRI committed May 5, 2021
1 parent be34a48 commit 6572ec6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <ignition/common/StringUtils.hh>
#include <ignition/common/Util.hh>
#include <ignition/transport/TopicUtils.hh>
#include <sdf/Types.hh>

#include "ignition/gazebo/components/Actor.hh"
#include "ignition/gazebo/components/Collision.hh"
Expand Down Expand Up @@ -295,7 +296,7 @@ std::string asFullPath(const std::string &_uri, const std::string &_filePath)
#endif

// When SDF is loaded from a string instead of a file
if ("data-string" == _filePath)
if (std::string(sdf::kSdfStringSource) == _filePath)
{
ignwarn << "Can't resolve full path for relative path ["
<< _uri << "]. Loaded from a data-string." << std::endl;
Expand Down

0 comments on commit 6572ec6

Please sign in to comment.