Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7")
else ()
message(FATAL_ERROR "C++11 needed. Therefore a gcc compiler with a version higher than 4.3 is needed.")
endif()
endif(CMAKE_COMPILER_IS_GNUCXX)
endif()

find_package(catkin REQUIRED COMPONENTS cv_bridge dynamic_reconfigure message_generation image_transport nodelet roscpp sensor_msgs std_msgs std_srvs class_loader)

Expand Down
23 changes: 13 additions & 10 deletions src/nodelet/face_recognition_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,13 @@ namespace filesystem3
namespace filesystem
{
#endif
template <>
path& path::append<typename path::iterator>(typename path::iterator lhs, typename path::iterator rhs,
const codecvt_type& cvt)
{
for (; lhs != rhs; ++lhs)
*this /= *lhs;
return *this;
}
path user_expanded_path(const path& p)
{
path::const_iterator it(p.begin());
if (p.size() < 2)
return p;

auto it = p.begin();
// Replace the tilda with the home directory
std::string user_dir = (*it).string();
if (user_dir.length() == 0 || user_dir[0] != '~')
return p;
Expand All @@ -121,8 +117,15 @@ path user_expanded_path(const path& p)
return p;
homedir = pw->pw_dir;
}

// Append the rest of path
ret = path(std::string(homedir));
return ret.append(++it, p.end(), path::codecvt());
++it;
for (; it != p.end(); ++it)
{
ret /= *it;
}
return ret;
}
} // namespace filesystem
} // namespace boost
Expand Down