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.
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 ofrust-script
will be a bit safer.