diff --git a/backend/src/data/backup.rs b/backend/src/data/backup.rs index 3cb376a..1d61237 100644 --- a/backend/src/data/backup.rs +++ b/backend/src/data/backup.rs @@ -64,7 +64,7 @@ async fn start(db_connection: &db::Connection, path: &PathBuf) { Ok(mut file_output) => { if let Err(error) = tokio::io::copy(&mut encoder, &mut file_output).await { error!("Error when compressing backup file: {}", error); - } else if let Err(error) = std::fs::remove_file(path) { + } else if let Err(error) = tokio::fs::remove_file(path).await { error!("Error when removing uncompressed backup file: {}", error); } else { info!("Backup done: {}", path_compressed.display());