Skip to content

Write database to a temporary file, then rename, so that hitting Ctrl+C does not leave you with a corrupted database.#465

Merged
Bodigrim merged 1 commit intondmitchell:masterfrom
Bodigrim:atomic-write
Dec 16, 2025
Merged

Write database to a temporary file, then rename, so that hitting Ctrl+C does not leave you with a corrupted database.#465
Bodigrim merged 1 commit intondmitchell:masterfrom
Bodigrim:atomic-write

Conversation

@Bodigrim
Copy link
Collaborator

Fixes #173.

So that hitting Ctrl+C does not leave you with a corrupted database.

This is using `withTempFile` from `temporary` and not from `extra`,
because it comes with more handy bells and whistles.
@Bodigrim Bodigrim merged commit ae6d1bc into ndmitchell:master Dec 16, 2025
5 checks passed
@Bodigrim Bodigrim deleted the atomic-write branch December 16, 2025 20:36
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.

Should write database to a temp file then rename

1 participant