#include "common/step/filesystem/step_recover_storage_directories.h"
#include "common/step/filesystem/step_remove_per_user_storage_directories.h"
-#include <boost/filesystem/path.hpp>
-#include <boost/system/error_code.hpp>
-
#include <pkgmgrinfo_basic.h>
+#include <filesystem>
+
#include "common/utils/paths.h"
#include "common/privileges.h"
#include "common/shared_dirs.h"
#include "common/utils/glist_range.h"
#include "common/utils/user_util.h"
-namespace bf = boost::filesystem;
namespace ci = common_installer;
+namespace fs = std::filesystem;
namespace {
}
bool StepRecoverStorageDirectories::MoveAppStorage(
- const bf::path& in_src,
- const bf::path& in_dst,
+ const fs::path& in_src,
+ const fs::path& in_dst,
const char *key) {
- bf::path src = in_src / key;
- if (!bf::exists(src))
+ fs::path src = in_src / key;
+ if (!fs::exists(src))
return false;
- bf::path dst = in_dst / key;
+ fs::path dst = in_dst / key;
return common_installer::MoveDir(src, dst);
}
Step::Status StepRecoverStorageDirectories::RecoveryUpdate() {
if (!context_->GetPkgPath().empty()) {
- bf::path backup_path = common_installer::GetBackupPathForPackagePath(
+ fs::path backup_path = common_installer::GetBackupPathForPackagePath(
context_->GetPkgPath());
- if (bf::exists(backup_path)) {
+ if (fs::exists(backup_path)) {
MoveAppStorage(context_->GetPkgPath(), backup_path, kDataLocation);
MoveAppStorage(context_->GetPkgPath(), backup_path, kSharedResLocation);
}
} // namespace filesystem
} // namespace common_installer
-