#include "common/step/filesystem/step_create_res_control_directories.h"
-#include <boost/filesystem/path.hpp>
-
+#include <filesystem>
#include <string>
#include "common/utils/file_util.h"
#include "common/utils/glist_range.h"
-namespace bf = boost::filesystem;
namespace ci = common_installer;
+namespace fs = std::filesystem;
namespace {
constexpr char kAllowedDir[] = "res/mount/allowed";
constexpr char kGlobalDir[] = "res/mount/global";
-bool CreateResControlDirs(const bf::path& root) {
+bool CreateResControlDirs(const fs::path& root) {
if (!ci::CreateDir(root / kAllowedDir))
return false;
if (!ci::CreateDir(root / kGlobalDir))
return true;
}
-bool RemoveResControlDirs(const bf::path& root) {
+bool RemoveResControlDirs(const fs::path& root) {
if (!ci::RemoveAll(root / kAllowedDir))
return false;
if (!ci::RemoveAll(root / kGlobalDir))
if (!HasResControl(context_->manifest_data.get()))
return Status::OK;
- bf::path root = context_->GetPkgPath();
+ fs::path root = context_->GetPkgPath();
if (!CreateResControlDirs(root)) {
LOG(ERROR) << "Failed to create res-control directories";
return Status::APP_DIR_ERROR;
if (!HasResControl(context_->manifest_data.get()))
return Status::OK;
- bf::path root = context_->GetPkgPath();
+ fs::path root = context_->GetPkgPath();
if (!RemoveResControlDirs(root)) {
LOG(ERROR) << "Failed to remove res-control directories";
return Status::APP_DIR_ERROR;