ToolInit: Attempt to create directory if it doesn't exist

This commit is contained in:
Phillip Stephens 2016-02-25 00:57:27 -08:00
parent 03efaa1e49
commit 84ff1558aa
1 changed files with 6 additions and 2 deletions

View File

@ -20,8 +20,12 @@ public:
if (HECL::Stat(dir->c_str(), &theStat)) if (HECL::Stat(dir->c_str(), &theStat))
{ {
LogModule.report(LogVisor::FatalError, _S("unable to stat '%s'"), dir->c_str()); HECL::MakeDir(dir->c_str());
return; if (HECL::Stat(dir->c_str(), &theStat))
{
LogModule.report(LogVisor::FatalError, _S("unable to stat '%s'"), dir->c_str());
return;
}
} }
if (!S_ISDIR(theStat.st_mode)) if (!S_ISDIR(theStat.st_mode))
{ {