rpcn: Fix file access error when loading rpcn.yml with version 1

The file was still in use when saving.
This commit is contained in:
Megamouse 2026-03-10 16:26:40 +01:00
parent 093e9dc5c7
commit c3aef0ca53

View file

@ -10,8 +10,7 @@ void cfg_rpcn::load()
{
const std::string path = cfg_rpcn::get_path();
fs::file cfg_file(path, fs::read);
if (cfg_file)
if (fs::file cfg_file(path, fs::read); cfg_file)
{
rpcn_log.notice("Loading RPCN config. Path: %s", path);
from_string(cfg_file.to_string());