Fix directory bug 55/66555/3 accepted/tizen/common/20160420.140707 accepted/tizen/ivi/20160420.043832 accepted/tizen/mobile/20160420.043745 accepted/tizen/tv/20160420.043803 accepted/tizen/wearable/20160420.043816 submit/tizen/20160419.111622
authorky85.kim <ky85.kim@samsung.com>
Tue, 19 Apr 2016 11:07:36 +0000 (20:07 +0900)
committerky85.kim <ky85.kim@samsung.com>
Tue, 19 Apr 2016 11:12:29 +0000 (20:12 +0900)
Change-Id: I11d3505d7746a29d6363791551c21e09e8d11531

common/vc_config_mgr.c

index c86ec92..71afe04 100644 (file)
@@ -534,6 +534,23 @@ int vc_config_mgr_initialize(int uid)
 
        g_engine_list = NULL;
 
+       if (0 != access(VC_CONFIG_BASE, F_OK)) {
+               if (0 != mkdir(VC_CONFIG_BASE, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)) {
+                       SLOG(LOG_ERROR, vc_config_tag(), "[ERROR] Fail to make directory : %s", VC_CONFIG_BASE);
+                       return -1;
+               } else {
+                       SLOG(LOG_DEBUG, vc_config_tag(), "Success to make directory : %s", VC_CONFIG_BASE);
+               }
+       }
+       if (0 != access(VC_RUNTIME_INFO_ROOT, F_OK)) {
+               if (0 != mkdir(VC_RUNTIME_INFO_ROOT, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)) {
+                       SLOG(LOG_ERROR, vc_config_tag(), "[ERROR] Fail to make directory : %s", VC_RUNTIME_INFO_ROOT);
+                       return -1;
+               } else {
+                       SLOG(LOG_DEBUG, vc_config_tag(), "Success to make directory : %s", VC_RUNTIME_INFO_ROOT);
+               }
+       }
+
        dp  = opendir(VC_DEFAULT_ENGINE_INFO);
        if (NULL != dp) {
                do {
@@ -1292,4 +1309,4 @@ int __vc_config_mgr_print_client_info()
        SLOG(LOG_DEBUG, vc_config_tag(), "--------------------------------------------");
 
        return 0;
-}
\ No newline at end of file
+}