--- a/libs/filesystem/src/path.cpp +++ b/libs/filesystem/src/path.cpp @@ -349,7 +349,7 @@ namespace filesystem size_type end_pos(m_parent_path_end()); return end_pos == string_type::npos ? path() - : path(m_pathname.c_str(), m_pathname.c_str() + end_pos); + : path(m_pathname.substr(0,end_pos)); } path path::filename() const