From 84ff1558aad30ff88dbe008eefa917c837952856 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 25 Feb 2016 00:57:27 -0800 Subject: [PATCH] ToolInit: Attempt to create directory if it doesn't exist --- hecl/driver/ToolInit.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hecl/driver/ToolInit.hpp b/hecl/driver/ToolInit.hpp index 037d2c429..6dd7e7c7b 100644 --- a/hecl/driver/ToolInit.hpp +++ b/hecl/driver/ToolInit.hpp @@ -20,8 +20,12 @@ public: if (HECL::Stat(dir->c_str(), &theStat)) { - LogModule.report(LogVisor::FatalError, _S("unable to stat '%s'"), dir->c_str()); - return; + HECL::MakeDir(dir->c_str()); + 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)) {