Replace 'move' with 'copy+delete'

This commit is contained in:
asonix 2020-06-14 22:35:00 -05:00
parent d025fbff21
commit 928fb8f277
1 changed files with 2 additions and 1 deletions

View File

@ -668,7 +668,8 @@ async fn safe_move_file(from: PathBuf, to: PathBuf) -> Result<(), UploadError> {
} }
debug!("Moving {:?} to {:?}", from, to); 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(()) Ok(())
} }