diff options
author | bunnei <bunneidev@gmail.com> | 2014-10-23 18:51:54 -0400 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-10-23 18:51:54 -0400 |
commit | ce8390ac03661ec2b16e48aeaca02ae8c9291ec5 (patch) | |
tree | 0d4a4391fda3c58522b6d6ef056b78f67d2b0592 /src/common/file_util.cpp | |
parent | 424fe2784404b8080b30bcf401b994b98b41579f (diff) | |
parent | a7c7946867c0f36c5091c1cf89954ccce637d51a (diff) |
Merge pull request #133 from archshift/sdmc-enabled
Use config files to store whether SDMC is enabled or not, auto-create SDMC dir.
Diffstat (limited to 'src/common/file_util.cpp')
-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 77a2268856..35da07306e 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp @@ -191,8 +191,10 @@ bool CreateFullPath(const std::string &fullPath) // Include the '/' so the first call is CreateDir("/") rather than CreateDir("") std::string const subPath(fullPath.substr(0, position + 1)); - if (!FileUtil::IsDirectory(subPath)) - FileUtil::CreateDir(subPath); + if (!FileUtil::IsDirectory(subPath) && !FileUtil::CreateDir(subPath)) { + ERROR_LOG(COMMON, "CreateFullPath: directory creation failed"); + return false; + } // A safety check panicCounter--; |