From 928fb8f277707e0bbcd2d7783570e2ffd6ff4798 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 14 Jun 2020 22:35:00 -0500 Subject: [PATCH] Replace 'move' with 'copy+delete' --- src/upload_manager.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/upload_manager.rs b/src/upload_manager.rs index 6272d0d..35f53b2 100644 --- a/src/upload_manager.rs +++ b/src/upload_manager.rs @@ -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(()) }