mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 05:09:20 +02:00
fix(editor): release the scenario file after load, undo a failed save
This commit is contained in:
@@ -418,6 +418,7 @@ bool save(std::string const &File, include_info const &Info, std::string &Error)
|
||||
if (error)
|
||||
{
|
||||
Error = "can't replace file \"" + File + "\": " + error.message();
|
||||
std::filesystem::remove(filepath + ".tmp", error);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user