Change TpkAppQueryInterface's logic of clearing tmp path 65/244565/3
authorIlho Kim <ilho159.kim@samsung.com>
Tue, 22 Sep 2020 02:21:23 +0000 (11:21 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Tue, 22 Sep 2020 02:37:41 +0000 (11:37 +0900)
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 <ilho159.kim@samsung.com>
src/tpk/tpk_app_query_interface.cc

index d4964c8baaedb46ec6b0a2e080f7154f6b3aee5d..5756363cdc0edcce8bc9848d0580ef947aae55d5 100644 (file)
@@ -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<const tpk::parse::PackageInfo>(
       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;
 }