Fix saving report in dir with more than one non-existing level (#11088)

This commit is contained in:
Sofya Balandina
2022-03-22 09:26:08 +03:00
committed by GitHub
parent a7df1531db
commit dfac195ffe
@@ -185,8 +185,8 @@ inline int createDirectoryRecursive(const std::string& dirPath) {
copyDirPath = copyDirPath.substr(0, pos);
}
while (!nested_dir_names.empty()) {
std::string a = copyDirPath + nested_dir_names.back();
if (createDirectory(a) != 0) {
copyDirPath = copyDirPath + nested_dir_names.back();
if (createDirectory(copyDirPath) != 0) {
return -1;
}
nested_dir_names.pop_back();