Minor fs::file usage fixes

Do not crash on file creation failure. Make some config writes atomic.
This commit is contained in:
Elad Ashkenazi 2024-06-10 11:49:00 +03:00
parent 4c9296c07f
commit 0b22423ab8
9 changed files with 21 additions and 9 deletions

View file

@ -5292,7 +5292,7 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module& module_part, co
if (g_cfg.core.llvm_logs)
{
out << *_module; // print IR
fs::file(cache_path + obj_name + ".log", fs::rewrite).write(out.str());
fs::write_file(cache_path + obj_name + ".log", fs::rewrite, out.str());
result.clear();
}