From f3f746be6c1c19c93d440bbc210dec631e2b42bb Mon Sep 17 00:00:00 2001 From: FxQnLr Date: Sat, 3 Dec 2022 20:08:42 +0100 Subject: remove mod start --- src/commands/update.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/commands') diff --git a/src/commands/update.rs b/src/commands/update.rs index be15cfa..482e588 100644 --- a/src/commands/update.rs +++ b/src/commands/update.rs @@ -1,6 +1,6 @@ use std::{io::{Error, ErrorKind}, fs::{rename, remove_file}}; -use crate::{config::Cfg, modrinth::{projects, Project, versions, extract_current_version, Version}, get_current_list, db::{userlist_get_all_ids, mods_get_versions, userlist_get_applicable_versions, userlist_change_versions, lists_get_all_ids, lists_get, userlist_get_current_version, userlist_add_disabled_versions, mods_change_versions}, List, input::Input, files::get_file_path, download_versions}; +use crate::{config::Cfg, modrinth::{projects, Project, versions, extract_current_version, Version}, get_current_list, db::{userlist_get_all_ids, mods_get_versions, userlist_get_applicable_versions, userlist_change_versions, lists_get_all_ids, lists_get, userlist_get_current_version, userlist_add_disabled_versions, mods_change_versions}, List, input::Input, files::{get_file_path, delete_version}, download_versions}; pub async fn update(config: Cfg, input: Input) -> Result<(), Box> { @@ -73,7 +73,12 @@ pub async fn update(config: Cfg, input: Input) -> Result<(), Box Result<(), Box> { - println!("Deleting version {} for mod {}", versionid, mod_id); - let file = get_file_path(current_list, String::from(&versionid))?; - - remove_file(file)?; - - Ok(()) -} - #[tokio::test] async fn download_updates_test() { -- cgit v1.2.3