#include "wgt/step/encryption/step_remove_encryption_data.h"
#include "wgt/step/filesystem/step_copy_preview_icons.h"
#include "wgt/step/filesystem/step_create_symbolic_link.h"
+#include "wgt/step/filesystem/step_restore_wgt_symbolic_link.h"
#include "wgt/step/filesystem/step_wgt_patch_icons.h"
#include "wgt/step/filesystem/step_wgt_patch_storage_directories.h"
#include "wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h"
AddStep<ci::filesystem::StepOptionalAcquireExternalStorage>();
AddStep<ci::filesystem::StepRemovePerUserStorageDirectories>(
wgt::filesystem::HybridAdditionalSharedDirs);
+ AddStep<wgt::filesystem::StepRestoreWgtSymbolicLink>();
AddStep<ci::pkgmgr::StepUnregisterApplication>();
AddStep<ci::filesystem::StepRemoveTep>();
AddStep<ci::filesystem::StepRemoveFiles>();
AddStep<ci::filesystem::StepOptionalAcquireExternalStorage>();
AddStep<ci::filesystem::StepRemovePerUserStorageDirectories>(
wgt::filesystem::HybridAdditionalSharedDirs);
+ AddStep<wgt::filesystem::StepRestoreWgtSymbolicLink>();
AddStep<ci::pkgmgr::StepUnregisterApplication>();
AddStep<wgt::encryption::StepRemoveEncryptionData>();
AddStep<ci::security::StepUnregisterTrustAnchor>();
--- /dev/null
+// Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by a apache 2.0 license that can be
+// found in the LICENSE file.
+
+#include "wgt/step/filesystem/step_restore_wgt_symbolic_link.h"
+
+#include "wgt/step/filesystem/step_create_symbolic_link.h"
+
+namespace bf = boost::filesystem;
+namespace bs = boost::system;
+
+namespace wgt {
+namespace filesystem {
+
+common_installer::Step::Status StepRestoreWgtSymbolicLink::undo() {
+ StepCreateSymbolicLink step(context_);
+
+ Status result = step.precheck();
+ if (result != Status::OK) {
+ LOG(ERROR) << "Fail to execute precheck of CreateWgtSymbolicLink";
+ return result;
+ }
+
+ result = step.process();
+ if (result != Status::OK) {
+ LOG(ERROR) << "Fail to execute process of CreateWgtSymbolicLink";
+ return result;
+ }
+
+ return result;
+}
+
+} // namespace filesystem
+} // namespace wgt
--- /dev/null
+// Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by a apache 2.0 license that can be
+// found in the LICENSE file.
+
+#ifndef WGT_STEP_FILESYSTEM_STEP_RESTORE_WGT_SYMBOLIC_LINK_H_
+#define WGT_STEP_FILESYSTEM_STEP_RESTORE_WGT_SYMBOLIC_LINK_H_
+
+#include <manifest_parser/utils/logging.h>
+
+#include <common/installer_context.h>
+#include <common/step/step.h>
+
+namespace wgt {
+namespace filesystem {
+
+/**
+ * \brief Step that create symbolic link to application
+ */
+class StepRestoreWgtSymbolicLink : public common_installer::Step {
+ public:
+ using Step::Step;
+
+ Status precheck() override { return Status::OK; }
+ Status process() override { return Status::OK; }
+ Status clean() override { return Status::OK; }
+ Status undo() override;
+
+ STEP_NAME(RestoreWgtSymbolicLink)
+};
+
+} // namespace filesystem
+} // namespace wgt
+
+#endif // WGT_STEP_FILESYSTEM_STEP_RESTORE_WGT_SYMBOLIC_LINK_H_
#include "wgt/step/encryption/step_remove_encryption_data.h"
#include "wgt/step/filesystem/step_copy_preview_icons.h"
#include "wgt/step/filesystem/step_create_symbolic_link.h"
+#include "wgt/step/filesystem/step_restore_wgt_symbolic_link.h"
#include "wgt/step/filesystem/step_wgt_patch_icons.h"
#include "wgt/step/filesystem/step_wgt_patch_storage_directories.h"
#include "wgt/step/filesystem/step_wgt_prepare_package_directory.h"
ci::Plugin::ActionType::Uninstall);
AddStep<ci::filesystem::StepRemovePerUserStorageDirectories>(
wgt::filesystem::WgtAdditionalSharedDirs);
+ AddStep<wgt::filesystem::StepRestoreWgtSymbolicLink>();
AddStep<ci::pkgmgr::StepUnregisterApplication>();
AddStep<ci::filesystem::StepRemoveTep>();
AddStep<ci::filesystem::StepRemoveFiles>();
ci::Plugin::ActionType::Uninstall);
AddStep<ci::filesystem::StepRemovePerUserStorageDirectories>(
wgt::filesystem::WgtAdditionalSharedDirs);
+ AddStep<wgt::filesystem::StepRestoreWgtSymbolicLink>();
AddStep<ci::pkgmgr::StepUnregisterApplication>();
AddStep<wgt::encryption::StepRemoveEncryptionData>();
AddStep<ci::security::StepUnregisterTrustAnchor>();