1 // Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by a apache 2.0 license that can be
3 // found in the LICENSE file.
5 #include "wgt/step/filesystem/step_restore_wgt_symbolic_link.h"
7 #include "wgt/step/filesystem/step_create_symbolic_link.h"
9 namespace bf = boost::filesystem;
10 namespace bs = boost::system;
13 namespace filesystem {
15 common_installer::Step::Status StepRestoreWgtSymbolicLink::undo() {
16 StepCreateSymbolicLink step(context_);
18 Status result = step.precheck();
19 if (result != Status::OK) {
20 LOG(ERROR) << "Fail to execute precheck of CreateWgtSymbolicLink";
24 result = step.process();
25 if (result != Status::OK) {
26 LOG(ERROR) << "Fail to execute process of CreateWgtSymbolicLink";
33 } // namespace filesystem