Skip to content

Commit

Permalink
Fix log data loss on force application shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 committed Jul 21, 2023
1 parent 9291e27 commit 38a5313
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rpcs3/rpcs3qt/main_window.cpp
Expand Up @@ -2413,6 +2413,12 @@ void main_window::CreateConnects()
// Try to copy it if fails
if (fs::copy_file(from, to, true))
{
if (fs::file sync_fd{to, fs::write})
{
// Prevent data loss (expensive)
sync_fd.sync();
}

fs::remove_file(from);
return true;
}
Expand Down

0 comments on commit 38a5313

Please sign in to comment.