Fix create directory
This commit is contained in:
parent
6cf28b4170
commit
93d096ed18
@ -11,7 +11,11 @@ namespace Utils
|
||||
|
||||
void WriteFile(std::string file, std::string data)
|
||||
{
|
||||
CreateDirectory(file.substr(0, file.find_last_of("/\\")));
|
||||
auto pos = file.find_last_of("/\\");
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
CreateDirectory(file.substr(0, pos));
|
||||
}
|
||||
|
||||
std::ofstream stream(file, std::ios::binary);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user