diff options
| author | 2014-10-23 18:51:54 -0400 | |
|---|---|---|
| committer | 2014-10-23 18:51:54 -0400 | |
| commit | ce8390ac03661ec2b16e48aeaca02ae8c9291ec5 (patch) | |
| tree | 0d4a4391fda3c58522b6d6ef056b78f67d2b0592 /src/common/file_util.cpp | |
| parent | Merge pull request #146 from yuriks/inttypes (diff) | |
| parent | Common: Return from CreateFullPath early if the directory creation fails (diff) | |
| download | yuzu-ce8390ac03661ec2b16e48aeaca02ae8c9291ec5.tar.gz yuzu-ce8390ac03661ec2b16e48aeaca02ae8c9291ec5.tar.xz yuzu-ce8390ac03661ec2b16e48aeaca02ae8c9291ec5.zip | |
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 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--; |