Issue with trailing slashes in creating directories.

This commit is contained in:
Tadas Baltrusaitis 2018-02-02 19:22:09 +00:00
parent ea64969e51
commit 729611cc16

View file

@ -59,6 +59,9 @@ void CreateDirectory(std::string output_path)
// Creating the right directory structure // Creating the right directory structure
auto p = path(output_path); auto p = path(output_path);
// Deal with a case where directory ends with a / or \\
p.remove_trailing_separator();
if (!boost::filesystem::exists(p)) if (!boost::filesystem::exists(p))
{ {
bool success = boost::filesystem::create_directories(p); bool success = boost::filesystem::create_directories(p);