summaryrefslogtreecommitdiff
path: root/src/common/file_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/file_util.cpp')
-rw-r--r--src/common/file_util.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 77a226885..35da07306 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -191,8 +191,10 @@ bool CreateFullPath(const std::string &fullPath)
191 191
192 // Include the '/' so the first call is CreateDir("/") rather than CreateDir("") 192 // Include the '/' so the first call is CreateDir("/") rather than CreateDir("")
193 std::string const subPath(fullPath.substr(0, position + 1)); 193 std::string const subPath(fullPath.substr(0, position + 1));
194 if (!FileUtil::IsDirectory(subPath)) 194 if (!FileUtil::IsDirectory(subPath) && !FileUtil::CreateDir(subPath)) {
195 FileUtil::CreateDir(subPath); 195 ERROR_LOG(COMMON, "CreateFullPath: directory creation failed");
196 return false;
197 }
196 198
197 // A safety check 199 // A safety check
198 panicCounter--; 200 panicCounter--;