see
reproduce:
- clone a large front-end project, on Windows
npm install
cd node_modules to simulate a file being locked by a process
- Open a new shell.
- Run
mv node_modules \.nd This command will take a long time and then fail.
is possible to change the fallback to copy only when the std::fs::rename report an ERROR_NOT_SAME_DEVICE/EXDEV error? this will failed immediately rather than takes a long time and then failed.
now it always trying to copy, even if it just an permission error, this takes a long time, and then failed again.