Change clean operations not to return failure 14/223114/3
authorIlho Kim <ilho159.kim@samsung.com>
Thu, 23 Jan 2020 01:41:29 +0000 (10:41 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Mon, 3 Feb 2020 04:19:20 +0000 (13:19 +0900)
Change-Id: I586f5785661eaf8dd06c841656323066ba038113
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/tpk/step/filesystem/step_tpk_update_package_directory.cc
src/tpk/step/pkgmgr/step_convert_xml.cc

index 3ec02050725fd0356061a1582b927d53f0c191e2..5d01ad63697922bd1a08e428c563a1e96cd4c116 100644 (file)
@@ -105,7 +105,8 @@ ci::Step::Status StepTpkUpdatePackageDirectory::process() {
 ci::Step::Status StepTpkUpdatePackageDirectory::clean() {
   bf::path backup_path =
       ci::GetBackupPathForPackagePath(context_->GetPkgPath());
-  return RemoveDirectory(backup_path);
+  RemoveDirectory(backup_path);
+  return Status::OK;
 }
 
 ci::Step::Status StepTpkUpdatePackageDirectory::undo() {
index 8f0be900064a2478566324346982461396b50e62..af824d75ca67b7aef4c3a8ab236f17fade2e6802 100644 (file)
@@ -133,13 +133,8 @@ common_installer::Step::Status StepConvertXml::process() {
 }
 
 common_installer::Step::Status StepConvertXml::clean() {
-  if (!backup_path_.empty()) {
-    bs::error_code error;
-    bf::remove(backup_path_, error);
-    if (error)
-      LOG(WARNING) << "Failed to remove backup file " << backup_path_
-                   << " due to error: " << error;
-  }
+  if (!backup_path_.empty())
+    ci::Remove(backup_path_);
 
   return Step::Status::OK;
 }