mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-05 20:55:05 +00:00
c6df0ba4c3
The doc says persist() replaces the destination file as rename() would do on Unix. persist_noclobber() doesn't, and is probably more reliable on Windows. I don't know if persist() is completely atomic on Windows, but if it isn't, it might be the source of the "permission denied" error under highly contended situation. https://docs.rs/tempfile/latest/tempfile/struct.NamedTempFile.html#method.persist https://github.com/Stebalien/tempfile/blob/v3.8.0/src/file/imp/windows.rs#L77 We could use persist_noclobber() on all platforms, but it's more involved on Unix. https://github.com/Stebalien/tempfile/blob/v3.8.0/src/file/imp/unix.rs#L107 |
||
---|---|---|
.. | ||
benches | ||
gen-protos | ||
src | ||
tests | ||
testutils | ||
Cargo.toml | ||
LICENSE |