add cache folder in shared folder when installing app 02/64002/3 accepted/tizen/common/20160406.143419 accepted/tizen/ivi/20160406.012034 accepted/tizen/mobile/20160406.011911 accepted/tizen/tv/20160406.011952 accepted/tizen/wearable/20160406.012014 submit/tizen/20160405.001024
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 29 Mar 2016 09:08:11 +0000 (18:08 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Tue, 5 Apr 2016 02:26:51 +0000 (19:26 -0700)
Change-Id: I84fdd11ed89f2347744d0ae2e0dd3a5906f2e84b
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/common/security_registration.cc
src/common/step/filesystem/step_create_storage_directories.cc

index 1c1ed8a..94f70b8 100644 (file)
@@ -30,6 +30,7 @@ const std::vector<std::pair<const char*,
   {"res/", SECURITY_MANAGER_PATH_RO},
   {"shared/", SECURITY_MANAGER_PATH_PUBLIC_RO},
   {"shared/data", SECURITY_MANAGER_PATH_OWNER_RW_OTHER_RO},
+  {"shared/cache", SECURITY_MANAGER_PATH_OWNER_RW_OTHER_RO},
   {"shared/trusted", SECURITY_MANAGER_PATH_TRUSTED_RW},
   {"tmp/", SECURITY_MANAGER_PATH_RW}
 };
index 280f2e5..970d7ea 100644 (file)
@@ -68,6 +68,13 @@ bool StepCreateStorageDirectories::SubShareDir() {
     return false;
   }
 
+  bf::path shared_cache_path = shared_path / kCache;
+  bf::create_directory(shared_cache_path, error_code);
+  if (error_code) {
+    LOG(ERROR) << "Failed to create shared/cache directory for package";
+    return false;
+  }
+
   return true;
 }