1 // Copyright (c) 2016 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 "common/step/filesystem/step_remove_tep.h"
9 namespace fs = std::filesystem;
11 namespace common_installer {
12 namespace filesystem {
14 Step::Status StepRemoveTep::process() {
15 if (context_->manifest_data.get()->tep_name) {
16 fs::path tep_path(context_->manifest_data.get()->tep_name);
17 if (fs::exists(tep_path)) {
18 std::error_code error;
19 fs::remove(tep_path, error);
21 // Deinstallation should not fail even if sd card is not inserted
22 // In spite of this, we print only warning
23 LOG(WARNING) << "Failed to remove tep file from: " << tep_path;
26 LOG(DEBUG) << "Tep package file removed: " << tep_path;
31 } // namespace filesystem
32 } // namespace common_installer