Use TZ_SYS_EXTENDEDSD_APP TZ_USER_EXTENDEDSD_APP for extended app path 58/156558/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Thu, 19 Oct 2017 02:14:09 +0000 (11:14 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Thu, 19 Oct 2017 02:14:09 +0000 (11:14 +0900)
Change-Id: I1fb562650f2f887719bf32d6cea0ed7e68902724
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/common/request.cc

index 90cbbd9..d1b98a1 100644 (file)
@@ -33,10 +33,12 @@ const char* GetRootAppPath(bool is_readonly, uid_t uid) {
 
 const char* GetExtendedRootAppPath(uid_t uid) {
   if (GetRequestMode(uid) == RequestMode::GLOBAL) {
-    return tzplatform_mkpath(TZ_SYS_EXTENDEDSD, "globalapps");
+    return tzplatform_getenv(TZ_SYS_EXTENDEDSD_APP);
   } else {
-    std::string rootpath = "apps/" + GetUsernameByUid(uid) + "/apps_rw";
-    return tzplatform_mkpath(TZ_SYS_EXTENDEDSD, rootpath.c_str());
+    tzplatform_set_user(uid);
+    const char* rootpath = tzplatform_getenv(TZ_USER_EXTENDEDSD_APP);
+    tzplatform_reset_user();
+    return rootpath;
   }
 }