Skip to content

[Feature/fix] Save to temp file first#3376

Merged
briaguya0 merged 2 commits intoHarbourMasters:develop-macreadyfrom
Malkierian:temp-save-file
Nov 15, 2023
Merged

[Feature/fix] Save to temp file first#3376
briaguya0 merged 2 commits intoHarbourMasters:develop-macreadyfrom
Malkierian:temp-save-file

Conversation

@Malkierian
Copy link
Contributor

@Malkierian Malkierian commented Nov 9, 2023

Due to the nature of crashes sometimes causing save corruption, and then causing more severe crashes because of the corruption, this PR changes SaveManager::SaveFileThreaded to utilize a temp file to save to, which is then copied to the real save file, to try to preserve all save files in a workable state, even if a crash interrupts the save thread. Also adds a "Save finish" log message to the end of the function to mirror the log message at the start of it.

Build Artifacts

@Malkierian Malkierian mentioned this pull request Nov 12, 2023
Copy link
Contributor

@Archez Archez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed working on Mac

@briaguya0 briaguya0 merged commit afe032e into HarbourMasters:develop-macready Nov 15, 2023
@Malkierian Malkierian deleted the temp-save-file branch May 7, 2024 00:38
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.

3 participants