Skip to content

When saving, write the save to a temporary file first#311

Open
kevinfoley wants to merge 2 commits intoluciusDXL:masterfrom
kevinfoley:kevinfoley/save-temp-file
Open

When saving, write the save to a temporary file first#311
kevinfoley wants to merge 2 commits intoluciusDXL:masterfrom
kevinfoley:kevinfoley/save-temp-file

Conversation

@kevinfoley
Copy link
Contributor

After writing the temporary file, move it to the final destination path. This way, if the game crashes while serializing and writing the save file, we don't have any risk of overwriting a valid save with a corrupted save.

You might prefer to implement this a different way; if so, just close the PR.

…ary file into the final destination path. This way, if the game crashes while writing the save file, we don't have any risk of overwriting a valid save with a corrupted save.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant