From: Junghyun Yeon Date: Thu, 15 Nov 2018 07:19:15 +0000 (+0900) Subject: Unmount only mount-update recover X-Git-Tag: submit/tizen/20181203.060015~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F193144%2F3;p=platform%2Fcore%2Fappfw%2Fapp-installers.git Unmount only mount-update recover Change-Id: I6cd8835fba89d82a5ac2edb703ab246f223256a3 Signed-off-by: Junghyun Yeon --- diff --git a/src/common/step/mount/step_mount_recover.cc b/src/common/step/mount/step_mount_recover.cc index 4fef1f6..036c3ff 100644 --- a/src/common/step/mount/step_mount_recover.cc +++ b/src/common/step/mount/step_mount_recover.cc @@ -35,11 +35,31 @@ Step::Status StepMountRecover::RecoveryMountUpdate() { } Step::Status StepMountRecover::clean() { + recovery::RecoveryFile* recovery_file = + context_->recovery_info.get().recovery_file.get(); + if (!recovery_file) { + LOG(ERROR) << "Failed to get recovery info"; + return Status::RECOVERY_ERROR; + } + + if (recovery_file->type() != RequestType::MountUpdate) + return Status::OK; + UmountPackagePath(); return Status::OK; } Step::Status StepMountRecover::undo() { + recovery::RecoveryFile* recovery_file = + context_->recovery_info.get().recovery_file.get(); + if (!recovery_file) { + LOG(ERROR) << "Failed to get recovery info"; + return Status::RECOVERY_ERROR; + } + + if (recovery_file->type() != RequestType::MountUpdate) + return Status::OK; + UmountPackagePath(); return Status::OK; }