Skip to content

Commit

Permalink
names::clean() will turn a '/' into '' (is that a bug or desired?), b…
Browse files Browse the repository at this point in the history
…ut also prefix a slash as needed, so accommodating that here. ros#1094
  • Loading branch information
lucasw committed Jul 15, 2017
1 parent 2d22f97 commit 3f3e3b5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions clients/roscpp/src/libros/this_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,9 @@ void ThisNode::init(const std::string& name, const M_string& remappings, uint32_
namespace_ = "/";
}

namespace_ = (namespace_ == "/")
? std::string("/")
: ("/" + namespace_)
;

namespace_ = names::clean(namespace_);
if (namespace_ == "")
namespace_ = "/";

std::string error;
if (!names::validate(namespace_, error))
Expand Down

0 comments on commit 3f3e3b5

Please sign in to comment.