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
1 changed files with 3 additions and 0 deletions

View File

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