summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/commands/source/download.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/commands/source/download.rs b/src/commands/source/download.rs
index b73a074..ce467e4 100644
--- a/src/commands/source/download.rs
+++ b/src/commands/source/download.rs
@@ -218,18 +218,13 @@ pub async fn download(
if source_path_exists && !force {
Err(anyhow!("Source exists: {}", source.path().display()))
} else {
- progressbar.lock()
- .await
- .inc_download_count()
- .await;
-
if source_path_exists /* && force is implied by 'if' above*/ {
if let Err(e) = source.remove_file().await {
- progressbar.lock().await.finish_one_download().await;
return Err(e)
}
}
+ progressbar.lock().await.inc_download_count().await;
perform_download(&source, progressbar.clone(), timeout).await?;
progressbar.lock().await.finish_one_download().await;
Ok(())