Skip to content
Snippets Groups Projects
Commit a7c79468 authored by archshift's avatar archshift
Browse files

Common: Return from CreateFullPath early if the directory creation fails

parent a59f57d5
No related branches found
No related tags found
No related merge requests found
......@@ -190,8 +190,10 @@ bool CreateFullPath(const std::string &fullPath)
// Include the '/' so the first call is CreateDir("/") rather than CreateDir("")
std::string const subPath(fullPath.substr(0, position + 1));
if (!FileUtil::IsDirectory(subPath))
FileUtil::CreateDir(subPath);
if (!FileUtil::IsDirectory(subPath) && !FileUtil::CreateDir(subPath)) {
ERROR_LOG(COMMON, "CreateFullPath: directory creation failed");
return false;
}
// A safety check
panicCounter--;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment