Fix StepUpdateTep's undo
[platform/core/appfw/app-installers.git] / src / common / step / filesystem / step_update_tep.cc
index d8ad9cf..41b5117 100644 (file)
@@ -85,7 +85,9 @@ Step::Status StepUpdateTep::clean() {
 }
 
 Step::Status StepUpdateTep::undo() {
-  RemoveAll(context_->tep_path.get());
+  const bf::path& remove_path = context_->tep_path.get();
+  RemoveAll(context_->old_manifest_data.get()->tep_name ?
+      remove_path : remove_path.parent_path());
   return Status::OK;
 }