|
pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> FsResult<()> { |
Our tmp device is on a different physical volume (cloud EBS volume) vs the project folder.
This code here that's doing the fs::rename does not work when source and destination are on different mount points:
https://doc.rust-lang.org/std/fs/fn.rename.html
ErrorKind::CrossDeviceLink
Please make this fs function more robust fs::copy and fs::remove_file