Remove backup dir for shared/res feature of web app 33/139133/6
authorjongmyeongko <jongmyeong.ko@samsung.com>
Mon, 17 Jul 2017 04:56:42 +0000 (13:56 +0900)
committerSemun Lee <semun.lee@samsung.com>
Mon, 7 Aug 2017 07:52:01 +0000 (07:52 +0000)
This step is called at the recovery request.

Change-Id: I211d17f59d92f989862ef1affd090197aa72d03e
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
src/common/step/filesystem/step_remove_temporary_directory.cc

index acf759b..4d6878a 100644 (file)
@@ -26,15 +26,16 @@ Step::Status StepRemoveTemporaryDirectory::RemoveFiles() {
   bf::path unpack_dir_path = context_->unpacked_dir_path.get();
   bf::path patch_dir_path = unpack_dir_path;
   bf::path mount_dir_path = unpack_dir_path;
+  bf::path shared_res_backup_dir_path = unpack_dir_path;
   patch_dir_path += ".patch";
   mount_dir_path += ".bck";
+  shared_res_backup_dir_path += ".SharedRes";
   if (unpack_dir_path.empty())
     return Step::Status::OK;
-  if (!RemoveAll(unpack_dir_path))
-    return Step::Status::RECOVERY_ERROR;
-  if (!RemoveAll(patch_dir_path))
-    return Step::Status::RECOVERY_ERROR;
-  if (!RemoveAll(mount_dir_path))
+  if (!RemoveAll(unpack_dir_path) ||
+      !RemoveAll(patch_dir_path) ||
+      !RemoveAll(mount_dir_path) ||
+      !RemoveAll(shared_res_backup_dir_path))
     return Step::Status::RECOVERY_ERROR;
   return Step::Status::OK;
 }