From f312b6fdb02cbc0de193f3ecc3716089dd74bb4e Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Wed, 20 Jul 2016 21:15:45 +0900 Subject: [PATCH] Change the order to make directories Change-Id: I9c08d885229f7c0c84cd2867d2078941d530db4b Signed-off-by: sooyeon.kim --- common/tts_config_mgr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common/tts_config_mgr.c b/common/tts_config_mgr.c index 6b78bfe..a008c7c 100644 --- a/common/tts_config_mgr.c +++ b/common/tts_config_mgr.c @@ -1035,25 +1035,25 @@ int tts_config_mgr_initialize(int uid) g_config_client_list = g_slist_append(g_config_client_list, temp_client); } - if (0 != access(TTS_HOME, F_OK)) { - if (0 != mkdir(TTS_HOME, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)) { - SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to make directory : %s", TTS_HOME); + if (0 != access(TTS_CONFIG_BASE, F_OK)) { + if (0 != mkdir(TTS_CONFIG_BASE, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)) { + SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to make directory : %s", TTS_CONFIG_BASE); __tts_config_release_client(uid); __tts_config_release_engine(); return TTS_CONFIG_ERROR_OPERATION_FAILED; } else { - SLOG(LOG_DEBUG, tts_tag(), "Success to make directory : %s", TTS_HOME); + SLOG(LOG_DEBUG, tts_tag(), "Success to make directory : %s", TTS_CONFIG_BASE); } } - if (0 != access(TTS_CONFIG_BASE, F_OK)) { - if (0 != mkdir(TTS_CONFIG_BASE, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)) { - SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to make directory : %s", TTS_CONFIG_BASE); + if (0 != access(TTS_HOME, F_OK)) { + if (0 != mkdir(TTS_HOME, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)) { + SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to make directory : %s", TTS_HOME); __tts_config_release_client(uid); __tts_config_release_engine(); return TTS_CONFIG_ERROR_OPERATION_FAILED; } else { - SLOG(LOG_DEBUG, tts_tag(), "Success to make directory : %s", TTS_CONFIG_BASE); + SLOG(LOG_DEBUG, tts_tag(), "Success to make directory : %s", TTS_HOME); } } -- 2.7.4