// removes trailing slashes, uses make_preferred void standardizePath(bfs::path& inPath) { string pathStr = inPath.string(); inPath.make_preferred(); if (inPath.filename() == ".") inPath.remove_filename(); }
/** * Makes sure \a path uses preferred slash and it ends with slash */ inline void make_preferred_dir_format(boost::filesystem::path& path) { path.make_preferred(); if(path.native().back() != path.preferred_separator) path = path.native() + path.preferred_separator; }