aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/settings/GlobalSettingStation.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-02-05 09:35:55 +0000
committerSaturneric <[email protected]>2022-02-05 09:35:55 +0000
commit260bb5426b6621d409f4e68981e49c936cb313bb (patch)
tree48a9b97c891d2bd8a02a43ce25dc5b725fe9a115 /src/ui/settings/GlobalSettingStation.cpp
parent<refactor>(ui, core, project): Move Key Package logic into core (diff)
downloadGpgFrontend-260bb5426b6621d409f4e68981e49c936cb313bb.tar.gz
GpgFrontend-260bb5426b6621d409f4e68981e49c936cb313bb.zip
<refactor>(ui, core, project): Use std::filesystem instead of boost::filesystem
Diffstat (limited to '')
-rw-r--r--src/ui/settings/GlobalSettingStation.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/settings/GlobalSettingStation.cpp b/src/ui/settings/GlobalSettingStation.cpp
index 5401536f..ee1a9351 100644
--- a/src/ui/settings/GlobalSettingStation.cpp
+++ b/src/ui/settings/GlobalSettingStation.cpp
@@ -61,7 +61,7 @@ void GpgFrontend::UI::GlobalSettingStation::SyncSettings() noexcept {
}
GpgFrontend::UI::GlobalSettingStation::GlobalSettingStation() noexcept {
- using namespace boost::filesystem;
+ using namespace std::filesystem;
using namespace libconfig;
el::Loggers::addFlag(el::LoggingFlag::AutoSpacing);
@@ -128,7 +128,7 @@ GpgFrontend::UI::GlobalSettingStation::GlobalSettingStation() noexcept {
}
void GpgFrontend::UI::GlobalSettingStation::AddRootCert(
- const boost::filesystem::path &path) {
+ const std::filesystem::path &path) {
std::string out_buffer;
if (!FileOperator::ReadFileStd(path.string(), out_buffer)) {
@@ -189,9 +189,9 @@ GpgFrontend::UI::GlobalSettingStation::generate_passphrase(int len) {
void GpgFrontend::UI::GlobalSettingStation::init_app_secure_key() {
GpgFrontend::write_buffer_to_file(app_secure_key_path_.string(),
generate_passphrase(256));
- boost::filesystem::permissions(app_secure_key_path_,
- boost::filesystem::owner_read |
- boost::filesystem::owner_write);
+ std::filesystem::permissions(app_secure_key_path_,
+ std::filesystem::perms::owner_read |
+ std::filesystem::perms::owner_write);
}
std::string GpgFrontend::UI::GlobalSettingStation::SaveDataObj(
@@ -238,7 +238,7 @@ GpgFrontend::UI::GlobalSettingStation::GetDataObject(const std::string &_key) {
const auto obj_path = app_data_objs_path_ / _hash_obj_key;
- if (!boost::filesystem::exists(obj_path)) {
+ if (!std::filesystem::exists(obj_path)) {
return {};
}
@@ -270,7 +270,7 @@ GpgFrontend::UI::GlobalSettingStation::GetDataObjectByRef(
auto _hash_obj_key = _ref;
const auto obj_path = app_data_objs_path_ / _hash_obj_key;
- if (!boost::filesystem::exists(obj_path))
+ if (!std::filesystem::exists(obj_path))
return {};
std::string buffer;