ensured building on latest archlinux system

This commit is contained in:
2024-12-01 19:37:17 +03:00
parent 88d849bee9
commit 362c70e695
9 changed files with 27 additions and 54 deletions

View File

@@ -4,18 +4,18 @@
#include <string>
#include "../utils/utils.h"
#if __GNUC__ < 8
#if __GNUC__ < 8 && __clang_major__ < 17
# include <experimental/filesystem>
using namespace std::experimental;
#else
# include <filesystem>
using std::filesystem;
using namespace std::filesystem;
#endif
Settings::Settings(std::string path) {
this->settings_file_path = path;
if (!filesystem::exists(path)) {
if (!exists(path)) {
std::ofstream output(path);
nlohmann::json settings = R"({
@@ -60,8 +60,8 @@ Settings::Settings(std::string path) {
this->settings = settings;
}
filesystem::create_directories(get_path_relative_to_home(this->settings["ofds_modules_dir"]));
filesystem::create_directories(get_path_relative_to_home(this->settings["stores_modules_dir"]));
create_directories(get_path_relative_to_home(this->settings["ofds_modules_dir"]));
create_directories(get_path_relative_to_home(this->settings["stores_modules_dir"]));
}
void Settings::write_setting(std::string setting, std::string value) {