Change clean operations not to return failure 15/223115/3
authorIlho Kim <ilho159.kim@samsung.com>
Thu, 23 Jan 2020 01:41:39 +0000 (10:41 +0900)
committerilho kim <ilho159.kim@samsung.com>
Fri, 14 Feb 2020 05:49:56 +0000 (05:49 +0000)
Change-Id: Ica687fe9393e7adff0bed3107b597df9472a2fab
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/wgt/step/filesystem/step_wgt_update_package_directory.cc

index 76396db..efe6be8 100644 (file)
@@ -108,14 +108,8 @@ ci::Step::Status StepWgtUpdatePackageDirectory::process() {
 ci::Step::Status StepWgtUpdatePackageDirectory::clean() {
   bf::path backup_path =
       ci::GetBackupPathForPackagePath(context_->GetPkgPath());
-  if (bf::exists(backup_path)) {
-    bs::error_code error;
-    bf::remove_all(backup_path, error);
-    if (error) {
-      LOG(ERROR) << "Failed to remove backup directories";
-      return Status::APP_DIR_ERROR;
-    }
-  }
+  if (bf::exists(backup_path))
+    ci::RemoveAll(backup_path);
   return Status::OK;
 }