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