Fix cannot save files on this folder

This commit is contained in:
nsubiron 2018-10-25 12:54:38 +02:00
parent 41a5af110e
commit 58150a65fe
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,10 @@ namespace carla {
}
path += ext;
}
fs::create_directories(path.parent_path());
auto parent = path.parent_path();
if (!parent.empty()) {
fs::create_directories(parent);
}
filepath = path.string();
}