fix some warnings

This commit is contained in:
Megamouse 2023-12-29 18:33:29 +01:00
parent b1c48e66c9
commit 59c58aa3cf
72 changed files with 263 additions and 203 deletions

View file

@ -41,11 +41,11 @@ void cfg_rpcn::save() const
}
#endif
fs::pending_file cfg_file(cfg_rpcn::get_path());
const std::string path = cfg_rpcn::get_path();
if (!cfg_file.file || (cfg_file.file.write(to_string()), !cfg_file.commit()))
if (!cfg::node::save(path))
{
rpcn_log.error("Could not save config: %s (error=%s)", cfg_rpcn::get_path(), fs::g_tls_error);
rpcn_log.error("Could not save config: %s (error=%s)", path, fs::g_tls_error);
}
}