1 // Copyright (c) 2018 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_check_mount_path.h"
10 #include "common/utils/paths.h"
12 namespace fs = std::filesystem;
14 namespace common_installer {
17 Step::Status StepCheckMountPath::process() {
18 fs::path zip_destination_path =
19 GetZipPackageLocation(context_->GetPkgPath(), context_->pkgid.get());
20 if (!fs::exists(zip_destination_path))
23 context_->manifest_data.get()->zip_mount_file =
24 strdup(zip_destination_path.c_str());
29 Step::Status StepCheckMountPath::precheck() {
30 if (context_->root_application_path.get().empty()) {
31 LOG(ERROR) << "root_application_path attribute is empty";
32 return Step::Status::INVALID_VALUE;
35 if (context_->pkgid.get().empty()) {
36 LOG(ERROR) << "pkgid attribute is empty";
37 return Step::Status::PACKAGE_NOT_FOUND;
40 return Step::Status::OK;
44 } // namespace common_installer