Quickfix context->application_path 55/38255/1
authorTomasz Iwanek <t.iwanek@samsung.com>
Tue, 14 Apr 2015 10:19:41 +0000 (12:19 +0200)
committerTomasz Iwanek <t.iwanek@samsung.com>
Wed, 15 Apr 2015 11:21:07 +0000 (13:21 +0200)
This field was set in context installer constructor where pkgid is
not yet available in installation case.

Change-Id: Ida6f97c763a2f3eec780d0c73fef08562de7547b

src/common/context_installer.cc
src/common/step/step_copy.cc
src/common/step/step_parse.cc

index d2f7082..e48fab7 100644 (file)
@@ -20,8 +20,6 @@ ContextInstaller::ContextInstaller()
           : tzplatform_getenv(TZ_SYS_RW_APP);
 
     root_application_path.set(root_app_path);
-    application_path.set(
-        (fs::path(root_app_path) / fs::path(pkgid.get())).native());
 }
 
 ContextInstaller::~ContextInstaller() {
index 03a4d2d..8a3e8b7 100644 (file)
@@ -17,6 +17,10 @@ namespace bs = boost::system;
 Step::Status StepCopy::process() {
   assert(!context_->pkgid.get().empty());
 
+  // set application path
+  context_->application_path.set(
+      context_->root_application_path.get() / context_->pkgid.get());
+
   bf::path install_path = bf::path(context_->application_path.get());
 
   context_->pkg_path.set(install_path.string());
index a724645..84c7ebb 100644 (file)
@@ -34,6 +34,12 @@ Step::Status StepParse::process() {
   }
 
   context_->manifest_data.set(mfx);
+
+  // TODO(t.iwanek): fix me -> it shouldn't be here
+  // set application path
+  context_->application_path.set(
+      context_->root_application_path.get() / context_->pkgid.get());
+
   context_->pkg_path.set(context_->application_path.get());
 
   LOG(DEBUG) << "Successfully parse tizen manifest xml";