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

View file

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