mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12:00
Fix abuse of fs::pending_file
Debug dumps don't fall into category which needs atomic rewrite.
This commit is contained in:
parent
065ee621b8
commit
14951d8713
2 changed files with 8 additions and 8 deletions
|
@ -4889,19 +4889,19 @@ bool spu_thread::capture_local_storage() const
|
|||
}
|
||||
}
|
||||
|
||||
fs::pending_file temp(elf_path);
|
||||
fs::file temp(elf_path, fs::rewrite);
|
||||
|
||||
if (!temp.file)
|
||||
if (!temp)
|
||||
{
|
||||
spu_log.error("Failed to create temporary file for '%s' (error=%s)", elf_path, fs::g_tls_error);
|
||||
spu_log.error("Failed to create file '%s' (error=%s)", elf_path, fs::g_tls_error);
|
||||
return false;
|
||||
}
|
||||
|
||||
temp.file.write(spu_exec.save());
|
||||
auto data = spu_exec.save();
|
||||
|
||||
if (!temp.commit(false))
|
||||
if (temp.write(data.data(), data.size()) != data.size())
|
||||
{
|
||||
spu_log.error("Failed to create rename temporary file to '%s' (error=%s)", elf_path, fs::g_tls_error);
|
||||
spu_log.error("Failed to write file '%s' (error=%s)", elf_path, fs::g_tls_error);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue