Merge pull request #133 from archshift/sdmc-enabled

Use config files to store whether SDMC is enabled or not, auto-create SDMC dir.
This commit is contained in:
bunnei 2014-10-23 18:51:54 -04:00
commit ce8390ac03
8 changed files with 40 additions and 4 deletions

View file

@ -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--;