Change WgtAppQueryInterface's logic of clearing tmp path 89/244389/8
authorIlho Kim <ilho159.kim@samsung.com>
Fri, 18 Sep 2020 05:05:40 +0000 (14:05 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Tue, 22 Sep 2020 02:37:58 +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: I45542eeaee653912cc1661fd6a0511a87ce7d020
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/wgt/utils/wgt_app_query_interface.cc

index d785f90..3c6772f 100644 (file)
@@ -71,7 +71,7 @@ std::string WgtAppQueryInterface::GetPkgIdFromPath(
       new parser::ManifestParser(std::move(registry)));
   bf::path config_path = tmp_path / GetManifestFileName();
   if (!parser->ParseManifest(config_path)) {
-    ci::RemoveAll(tmp_path);
+    ClearTemporaryFile(tmp_path);
     return {};
   }
   auto info = std::static_pointer_cast<const wgt::parse::TizenApplicationInfo>(
@@ -83,12 +83,12 @@ std::string WgtAppQueryInterface::GetPkgIdFromPath(
           wgt::application_widget_keys::kTizenAddonKey));
 
   if (!info && !info_addon) {
-    ci::RemoveAll(tmp_path);
+    ClearTemporaryFile(tmp_path);
     return {};
   }
   std::string pkg_id = !info ? info_addon->package() : info->package();
 
-  ci::RemoveAll(tmp_path);
+  ClearTemporaryFile(tmp_path);
   return pkg_id;
 }