uv/crates/uv-fs
Jp dd442450b0
Retry mechanisms on Windows for copy_atomic and write_atomic (#10026)
Hello! 🙂 


## Summary

After submitting retry mechanisms on scripts installation for windows:
#9543 , I noticed that some other functions were using the same
`persist` features of temporary files. This could lead to the same issue
spotted before (temporary lock by AV/EDR software). I validated that it
was possible.

So I updated them to go through the same function on Windows, which is
using the retry mechanisms if needed.
In order to do so, I add to add an async version of the
`persist_with_retry`.

There is a little trick to make the borrow-checker happy line 306,
curious of your opinion on it? This is just a pointer move so it should
not induce some performance regression if I'm not mistaking.

I also updated them to use `fs_err` on Unix for better error messages.

Also, one of the error messages I introduced was badly formatted, I
fixed it. 🙂

## Test Plan

The changes should be iso functional and covered with the existing
test-suite.
2024-12-19 08:43:57 -05:00
..
src Retry mechanisms on Windows for copy_atomic and write_atomic (#10026) 2024-12-19 08:43:57 -05:00
Cargo.toml Make the backoff crate dependency Windows-only (#10002) 2024-12-18 10:04:54 -05:00