1 // Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
5 #include "step/mount/step_unmount.h"
10 #include "common/utils/paths.h"
11 #include "common/tzip_interface.h"
12 #include "common/zip_interface.h"
14 namespace fs = std::filesystem;
16 namespace common_installer {
19 Step::Status StepUnmount::process() {
20 auto zip_final = CreateZipInterface(
21 GetMountLocation(context_->GetPkgPath()));
23 if (!zip_final->UnmountZip()) {
24 LOG(ERROR) << "Failed to unmount zip package after installation";
25 return Status::APP_DIR_ERROR;
31 std::unique_ptr<IZipInterface> StepUnmount::CreateZipInterface(
32 const fs::path& mount_path) {
33 std::unique_ptr<IZipInterface> zip_interface(
34 new TzipInterface(mount_path));
39 } // namespace common_installer