UI: Use os_mkdirs, remove redundant do_mkdir calls

This commit is contained in:
jp9000 2015-07-08 10:03:39 -07:00
parent d3ba8c8af4
commit af1014471d

View file

@ -266,7 +266,7 @@ bool OBSApp::InitGlobalConfigDefaults()
static bool do_mkdir(const char *path)
{
if (os_mkdir(path) == MKDIR_ERROR) {
if (os_mkdirs(path) == MKDIR_ERROR) {
OBSErrorBox(NULL, "Failed to create directory %s", path);
return false;
}
@ -278,18 +278,6 @@ static bool MakeUserDirs()
{
char path[512];
if (portable_mode) {
if (GetConfigPath(path, sizeof(path), "") <= 0)
return false;
if (!do_mkdir(path))
return false;
}
if (GetConfigPath(path, sizeof(path), "obs-studio") <= 0)
return false;
if (!do_mkdir(path))
return false;
if (GetConfigPath(path, sizeof(path), "obs-studio/basic") <= 0)
return false;
if (!do_mkdir(path))