mirror of https://github.com/AxioDL/metaforce.git
ToolInit: Attempt to create directory if it doesn't exist
This commit is contained in:
parent
03efaa1e49
commit
84ff1558aa
|
@ -18,11 +18,15 @@ public:
|
||||||
else
|
else
|
||||||
dir = &info.cwd;
|
dir = &info.cwd;
|
||||||
|
|
||||||
|
if (HECL::Stat(dir->c_str(), &theStat))
|
||||||
|
{
|
||||||
|
HECL::MakeDir(dir->c_str());
|
||||||
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());
|
LogModule.report(LogVisor::FatalError, _S("unable to stat '%s'"), dir->c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!S_ISDIR(theStat.st_mode))
|
if (!S_ISDIR(theStat.st_mode))
|
||||||
{
|
{
|
||||||
LogModule.report(LogVisor::FatalError, _S("'%s' is not a directory"), dir->c_str());
|
LogModule.report(LogVisor::FatalError, _S("'%s' is not a directory"), dir->c_str());
|
||||||
|
|
Loading…
Reference in New Issue