From: Ilho Kim Date: Tue, 22 Sep 2020 02:21:23 +0000 (+0900) Subject: Change TpkAppQueryInterface's logic of clearing tmp path X-Git-Tag: submit/tizen/20201027.061339~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f71535fa5d69525bd3d202f9fe8c2ef99cd5786;p=platform%2Fcore%2Fappfw%2Ftpk-backend.git Change TpkAppQueryInterface's logic of clearing tmp path Extracting function can be override by child class, So the clearing function should be overridable function - Requires: [app-installers] https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/244388/ Change-Id: I588b9d3eb188b084a76c6ab2d6078690de1b7123 Signed-off-by: Ilho Kim --- diff --git a/src/tpk/tpk_app_query_interface.cc b/src/tpk/tpk_app_query_interface.cc index d4964c8..5756363 100644 --- a/src/tpk/tpk_app_query_interface.cc +++ b/src/tpk/tpk_app_query_interface.cc @@ -46,23 +46,23 @@ std::string TpkAppQueryInterface::GetPkgIdFromPath( return {}; bf::path manifest_path = tmp_path / kManifestFileName; if (!bf::exists(manifest_path)) { - ci::RemoveAll(tmp_path); + ClearTemporaryFile(tmp_path); return {}; } tpk::parse::TPKConfigParser parser; if (!parser.ParseManifest(manifest_path)) { - ci::RemoveAll(tmp_path); + ClearTemporaryFile(tmp_path); return {}; } auto package_info = std::static_pointer_cast( parser.GetManifestData(tpk::application_keys::kManifestKey)); if (!package_info) { - ci::RemoveAll(tmp_path); + ClearTemporaryFile(tmp_path); return {}; } std::string pkg_id = package_info->package(); - ci::RemoveAll(tmp_path); + ClearTemporaryFile(tmp_path); return pkg_id; }