From: ilho kim Date: Mon, 9 Jan 2023 02:49:49 +0000 (+0900) Subject: Fix StepUpdateTep's undo X-Git-Tag: accepted/tizen/7.0/unified/20230111.015138~2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fappfw%2Fapp-installers.git;a=commitdiff_plain;h=fbeebec15118bf5eced5af1e91cf7304edeeb03e Fix StepUpdateTep's undo If there is no tep before updating the tep directory itself must be removed at undo Change-Id: I6b8e395c9f7f7758d5eb85f38cd4cbdae12fb5c0 Signed-off-by: ilho kim --- diff --git a/src/common/step/filesystem/step_update_tep.cc b/src/common/step/filesystem/step_update_tep.cc index d8ad9cf..41b5117 100644 --- a/src/common/step/filesystem/step_update_tep.cc +++ b/src/common/step/filesystem/step_update_tep.cc @@ -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; }