Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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