Hi @cyplo as you’ve noticed Rustup is currently a bit under-staffed. You can ping me on any PR and I’ll either review or try and find someone to review.
I’m not sure how you reproduce this for a test - it feels like you would need to run in an environment where rename does not work, I’m not sure how to emulate that in a test - it seems hard to mock out since the function is in the standard library.
Looking at the sources, there already exists a wrapper function called utils::rename_file, it’s used by components and transaction. Would that be a good candidate here to replace every other call to fs::rename ?
This sounds like a good approach, but I’m not sure exactly how to detect the correct course of action inside rename_file - doing a copy and delete seems suboptimal, so we should only do it where necessary, which I think precludes doing it on all Linux systems.