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 <ilho159.kim@samsung.com>
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;
}