From 3a8f13bcfd4131ede02e2826b06e08a8021ca731 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Thu, 23 Jan 2020 10:41:39 +0900 Subject: [PATCH] Change clean operations not to return failure Change-Id: Ica687fe9393e7adff0bed3107b597df9472a2fab Signed-off-by: Ilho Kim --- src/wgt/step/filesystem/step_wgt_update_package_directory.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/wgt/step/filesystem/step_wgt_update_package_directory.cc b/src/wgt/step/filesystem/step_wgt_update_package_directory.cc index 76396db..efe6be8 100644 --- a/src/wgt/step/filesystem/step_wgt_update_package_directory.cc +++ b/src/wgt/step/filesystem/step_wgt_update_package_directory.cc @@ -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; } -- 2.7.4