Debugging
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 2m10s

This commit is contained in:
Your Name
2025-05-25 19:17:51 +12:00
parent 1502d6e3d2
commit 8f06fc31ae
17 changed files with 220 additions and 188 deletions

View File

@@ -37,7 +37,7 @@ bool config::load_config() { // load json config file.
}
catch (nlohmann::json::parse_error& ex)
{
std::cerr << "Error: Failed to parse config file: " << ex.what() << std::endl;
error << "Failed to parse config file: " << ex.what() << std::endl;
return false;
}
@@ -69,7 +69,7 @@ bool config::save_config(bool create_aux_directories)
if (!mIsConfigSet)
{
std::string homedir = localpath::current_user_home();
std::string dropshell_base = homedir + "/.local/dropshell_files";
std::string dropshell_base = homedir + "/.dropshell";
mConfig["server_definition_paths"] = {
dropshell_base + "/servers"
@@ -81,6 +81,10 @@ bool config::save_config(bool create_aux_directories)
"https://templates.dropshell.app"
};
mConfig["template_upload_token"] = "SECRETTOKEN";
mConfig["backups_path"] = {
dropshell_base + "/backups"
};
}
config_file << mConfig.dump(4);
@@ -175,4 +179,10 @@ std::string config::get_template_upload_token() {
return mConfig["template_upload_token"];
}
std::string config::get_backups_path()
{
return mConfig["backups_path"];
}
} // namespace dropshell