mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Fix log data loss on force application shutdown
This commit is contained in:
parent
9291e2777d
commit
38a5313ed2
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue