Revert "Remove already exist path during StepCopy" 79/318879/1
authorIlho Kim <ilho159.kim@samsung.com>
Thu, 10 Oct 2024 08:42:02 +0000 (17:42 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Thu, 10 Oct 2024 08:49:20 +0000 (17:49 +0900)
This reverts commit a981b689664d2394736f8214e7fd47e3a935f893.

Change-Id: Ib344e55fc63fc37c12baafea38289a8386c67dcd
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/common/step/filesystem/step_copy.cc

index c3c317aed286ed044b8c87fd9f815dd00e7eb910..9e92a4ed876ff968fc4f314203896111b841a205 100644 (file)
@@ -74,17 +74,6 @@ Step::Status StepCopy::process() {
                << install_path.parent_path().string();
     return Step::Status::APP_DIR_ERROR;
   }
-
-  if (fs::exists(install_path)) {
-    LOG(DEBUG) << "Install path [" << install_path
-        << "] is already exists, try to remove install path";
-    if (!RemoveAll(install_path)) {
-      LOG(ERROR) << "Failed to remove the already existing install path["
-          << install_path << "]";
-      return Step::Status::APP_DIR_ERROR;
-    }
-  }
-
   if (!MoveDir(context_->unpacked_dir_path.get(), install_path,
                FSFlag::FS_MERGE_SKIP)) {
     LOG(ERROR) << "Cannot move widget directory to install path, from "