From: Ilho Kim Date: Thu, 8 Sep 2022 11:21:33 +0000 (+0900) Subject: Try to remove the location of the extract entry X-Git-Tag: accepted/tizen/unified/20220915.173218~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc1cc38da4132c579fb208c2fb6c6834cd6618ad;p=platform%2Fcore%2Fappfw%2Ftpk-backend.git Try to remove the location of the extract entry Because MountInstall is performed when there is no manifest a file may exist in the extract entry path, so remove that Related: [app-installers]https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/281054/ Change-Id: I23c6c90b4f73ec77fb288ce86cf9e1c9bf45883a Signed-off-by: Ilho Kim --- diff --git a/src/tpk/step/filesystem/step_tpk_prepare_package_directory.cc b/src/tpk/step/filesystem/step_tpk_prepare_package_directory.cc index 74ff983..0241fbe 100644 --- a/src/tpk/step/filesystem/step_tpk_prepare_package_directory.cc +++ b/src/tpk/step/filesystem/step_tpk_prepare_package_directory.cc @@ -91,7 +91,9 @@ ci::Step::Status StepTpkPreparePackageDirectory::ExtractEntries() { for (auto& entry : tpk::GetExtractEntries()) { LOG(DEBUG) << "Extracting: " << entry; - if (context_->request_type.get() == ci::RequestType::MountUpdate) { + if (context_->request_type.get() == ci::RequestType::MountInstall) { + ci::RemoveAll(context_->GetPkgPath() / entry); + } else if (context_->request_type.get() == ci::RequestType::MountUpdate) { if (BackupDirectory(entry, backup_path) != Status::OK) return Status::APP_DIR_ERROR; }