mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 09:48:37 +12:00
Savestates: Fixup file write
This commit is contained in:
parent
0fcb0b7d8e
commit
91a54c11eb
3 changed files with 11 additions and 8 deletions
|
@ -3345,13 +3345,13 @@ void Emulator::Kill(bool allow_autoexit, bool savestate, savestate_stage* save_s
|
|||
|
||||
set_progress_message("Commiting File");
|
||||
|
||||
fs::file to_close_file;
|
||||
{
|
||||
auto& ar = *to_ar->load();
|
||||
auto reset = init_mtx->reset();
|
||||
to_close_file = std::move(file.file);
|
||||
ar = {};
|
||||
ar.set_reading_state(); // Guard against using it
|
||||
reset.set_init();
|
||||
}
|
||||
to_close_file.close();
|
||||
|
||||
if (!file.commit() || !fs::get_stat(path, file_stat))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue