Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / step / filesystem / step_recover_manifest.cc
index 55d0ec9..21e9d9b 100644 (file)
@@ -4,16 +4,14 @@
 
 #include "common/step/filesystem/step_recover_manifest.h"
 
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/path.hpp>
-#include <boost/system/error_code.hpp>
 #include <pkgmgr-info.h>
 
+#include <filesystem>
+
 #include "common/utils/paths.h"
 #include "common/utils/file_util.h"
 
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
+namespace fs = std::filesystem;
 
 namespace common_installer {
 namespace filesystem {
@@ -33,7 +31,7 @@ Step::Status StepRecoverManifest::RecoveryUpdate() {
     LOG(DEBUG) << "Manifest recovery not needed";
     return Status::OK;
   }
-  if (bf::exists(context_->backup_xml_path.get())) {
+  if (fs::exists(context_->backup_xml_path.get())) {
     if (!Remove(context_->xml_path.get())) {
       LOG(ERROR) << "Cannot move manifest file to restore its location";
       return Status::RECOVERY_ERROR;
@@ -49,7 +47,7 @@ Step::Status StepRecoverManifest::RecoveryReadonlyUpdateInstall() {
     LOG(DEBUG) << "Manifest recovery not needed";
     return Status::OK;
   }
-  if (bf::exists(context_->xml_path.get())) {
+  if (fs::exists(context_->xml_path.get())) {
     if (!Remove(context_->xml_path.get())) {
       LOG(ERROR) << "Cannot move manifest file to restore its location";
       return Status::RECOVERY_ERROR;
@@ -64,7 +62,7 @@ Step::Status StepRecoverManifest::Cleanup() {
     LOG(DEBUG) << "Manifest recovery not needed";
     return Status::OK;
   }
-  if (bf::exists(context_->backup_xml_path.get())) {
+  if (fs::exists(context_->backup_xml_path.get())) {
     if (!Remove(context_->backup_xml_path.get())) {
       LOG(ERROR) << "Cannot remove backup manifest file";
       return Status::RECOVERY_ERROR;
@@ -77,8 +75,8 @@ Step::Status StepRecoverManifest::Cleanup() {
 bool StepRecoverManifest::SetXmlPaths(bool is_readonly_package) {
   if (context_->pkgid.get().empty())
     return false;
-  bf::path xml_path =
-      bf::path(getUserManifestPath(context_->uid.get(), is_readonly_package))
+  fs::path xml_path =
+      fs::path(getUserManifestPath(context_->uid.get(), is_readonly_package))
       / context_->pkgid.get();
   xml_path += ".xml";
   context_->xml_path.set(xml_path);