Skip to content

Conversation

@epage
Copy link
Owner

@epage epage commented Apr 22, 2022

From fornwall/rust-script#49

This patch makes file writes use "create a temp file in the same directory, write to it, and move the it to the final location" pattern. This makes no other process trying to read Cargo.toml/metadata.json get a half-written state, so concurrent run of rust-script will be a bit safer.

@epage epage merged commit 6d80677 into main Apr 25, 2022
@epage epage deleted the feat/atomic-write branch April 25, 2022 17:57
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