Skip to content

Make Editor file write atomic via tempfile + os.replace#7

Closed
nathanjmcdougall wants to merge 2 commits into
mainfrom
atomic-editor-write
Closed

Make Editor file write atomic via tempfile + os.replace#7
nathanjmcdougall wants to merge 2 commits into
mainfrom
atomic-editor-write

Conversation

@nathanjmcdougall
Copy link
Copy Markdown
Collaborator

Write to a temporary file in the same directory then os.replace() onto the target, so the file is never left half-written on crash or disk-full.

Write to a temporary file in the same directory then os.replace() onto
the target, so the file is never left half-written on crash or disk-full.
@nathanjmcdougall
Copy link
Copy Markdown
Collaborator Author

Overkill.

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