Skip to content
Snippets Groups Projects
Commit 1b670a29 authored by Perttu Ahola's avatar Perttu Ahola
Browse files

Fix CreateAllDirs() (failed for relative fully non-existing path)

parent 45f78bdf
Branches
Tags
No related merge requests found
......@@ -327,11 +327,12 @@ bool CreateAllDirs(std::string path)
tocreate.push_back(basepath);
pos = basepath.rfind(DIR_DELIM_C);
if(pos == std::string::npos)
return false;
break;
basepath = basepath.substr(0,pos);
}
for(int i=tocreate.size()-1;i>=0;i--)
CreateDir(tocreate[i]);
if(!CreateDir(tocreate[i]))
return false;
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment