2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-20 11:21:14 +00:00

Replace 'move' with 'copy+delete'

This commit is contained in:
asonix 2020-06-14 22:35:00 -05:00
parent d025fbff21
commit 928fb8f277

View file

@ -668,7 +668,8 @@ async fn safe_move_file(from: PathBuf, to: PathBuf) -> Result<(), UploadError> {
}
debug!("Moving {:?} to {:?}", from, to);
actix_fs::rename(from, to).await?;
actix_fs::copy(from.clone(), to).await?;
actix_fs::remove_file(from).await?;
Ok(())
}