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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,8 +185,8 @@ inline int createDirectoryRecursive(const std::string& dirPath) {
copyDirPath = copyDirPath.substr(0, pos); copyDirPath = copyDirPath.substr(0, pos);
} }
while (!nested_dir_names.empty()) { while (!nested_dir_names.empty()) {
std::string a = copyDirPath + nested_dir_names.back(); copyDirPath = copyDirPath + nested_dir_names.back();
if (createDirectory(a) != 0) { if (createDirectory(copyDirPath) != 0) {
return -1; return -1;
} }
nested_dir_names.pop_back(); nested_dir_names.pop_back();