use tizen-platform metadata for "/home" 85/62085/3
authorjongmyeongko <jongmyeong.ko@samsung.com>
Mon, 14 Mar 2016 08:27:13 +0000 (17:27 +0900)
committerjongmyeongko <jongmyeong.ko@samsung.com>
Wed, 16 Mar 2016 01:37:55 +0000 (10:37 +0900)
Change-Id: Id200c785b466f8472aa3aaaa824bb29a9012ac8c
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
src/common/installer_context.h
src/pkgdir_tool/pkgdir_tool.cc

index ac82ba1..53d2391 100644 (file)
@@ -239,7 +239,8 @@ class InstallerContext {
 
   /**
    * \brief root directory of installation of all packages for user
-   *        (/home/${USER}/apps_rw/) or tizenglobalapp user (/usr/apps/)
+   *        (${TZ_USER_HOME}/${USER}/apps_rw/) or
+   *        tizenglobalapp user (${TZ_SYS_RO_APP} or ${TZ_SYS_RW_APP})
    */
   Property<boost::filesystem::path> root_application_path;
 
index ffd8d7a..898764e 100644 (file)
@@ -221,8 +221,8 @@ bool CreateDirectories(const bf::path& app_dir, const std::string& pkgid,
 
 bool CreatePerUserDirectories(const std::string& pkgid,
     const std::string& author_id, const std::string& api_version) {
-  for (bf::directory_iterator iter("/home"); iter != bf::directory_iterator();
-       ++iter) {
+  for (bf::directory_iterator iter(tzplatform_getenv(TZ_USER_HOME));
+       iter != bf::directory_iterator(); ++iter) {
     if (!bf::is_directory(iter->path()))
       return false;
     const bf::path& home_path = iter->path();
@@ -301,8 +301,8 @@ bool DeleteDirectories(const bf::path& app_dir, const std::string& pkgid) {
 }
 
 bool DeletePerUserDirectories(const std::string& pkgid) {
-  for (bf::directory_iterator iter("/home"); iter != bf::directory_iterator();
-       ++iter) {
+  for (bf::directory_iterator iter(tzplatform_getenv(TZ_USER_HOME));
+       iter != bf::directory_iterator(); ++iter) {
     if (!bf::is_directory(iter->path()))
       return false;
     const bf::path& home_path = iter->path();