UESaveFile: copy the temp file over the old one.
This is to prevent an issue where updating a profile save makes the app think it's deleted.
This commit is contained in:
parent
133c34f5f7
commit
1871440a7b
1 changed files with 4 additions and 5 deletions
|
@ -128,13 +128,12 @@ auto UESaveFile::saveToFile() -> bool {
|
|||
return false;
|
||||
}
|
||||
|
||||
if(!Utility::Path::remove(_filepath)) {
|
||||
if(!Utility::Path::copy(_filepath + ".tmp"_s, _filepath)) {
|
||||
Utility::Path::copy(_filepath + ".bak"_s, _filepath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!Utility::Path::move(_filepath + ".tmp"_s, _filepath)) {
|
||||
Utility::Path::move(_filepath + ".bak"_s, _filepath);
|
||||
return false;
|
||||
else {
|
||||
Utility::Path::remove(_filepath + ".tmp"_s);
|
||||
}
|
||||
|
||||
_noReloadAfterSave = true;
|
||||
|
|
Loading…
Reference in a new issue