UESaveFile: close the file after we're done writing to it.

This commit is contained in:
Guillaume Jacquemin 2021-09-22 21:50:39 +02:00
parent b3220ca8e1
commit 0826d4aede
1 changed files with 2 additions and 0 deletions

View File

@ -101,6 +101,8 @@ auto UESaveFile::saveToFile() -> bool {
writer.writeUnsignedInt(0);
writer.closeFile();
if(!Utility::Directory::copy(_filepath, _filepath + ".bak")) {
return false;
}