From 54752f7eb39e20929a7816c90be33bf8dbff2a6c Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Sun, 29 Jan 2023 13:56:06 +0100 Subject: fixed not downloading on mod add --- src/commands/modification.rs | 4 ++-- src/commands/update.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/commands') diff --git a/src/commands/modification.rs b/src/commands/modification.rs index c194202..c82d6b5 100644 --- a/src/commands/modification.rs +++ b/src/commands/modification.rs @@ -18,7 +18,7 @@ async fn add(config: Cfg, input: Input) -> MLE<()> { Ok(()) } -pub async fn mod_add(config: Cfg, mod_id: Vec, list: List, disable_download: bool) -> MLE<()> { +pub async fn mod_add(config: Cfg, mod_id: Vec, list: List, direct_download: bool) -> MLE<()> { //Fix printing (its horrible) println!("Adding mod(s) {:?}", mod_id); @@ -80,7 +80,7 @@ pub async fn mod_add(config: Cfg, mod_id: Vec, list: List, disable_downl }, }; - if !disable_download && current_version.is_some() { download_versions(list.clone(), config.clone(), vec![current_version.unwrap()]).await?; }; + if direct_download && current_version.is_some() { download_versions(list.clone(), config.clone(), vec![current_version.unwrap()]).await?; }; } diff --git a/src/commands/update.rs b/src/commands/update.rs index f71f537..d400a24 100644 --- a/src/commands/update.rs +++ b/src/commands/update.rs @@ -74,7 +74,7 @@ pub async fn cmd_update(config: Cfg, liststack: Vec, clean: bool, direct_d //Linebreak readability println!(""); - if direct_download { + if direct_download && !updatestack.is_empty() { download_versions(current_list.clone(), config.clone(), updatestack).await?; //Disable old versions @@ -90,7 +90,6 @@ pub async fn cmd_update(config: Cfg, liststack: Vec, clean: bool, direct_d } } }; - } Ok(()) -- cgit v1.2.3