summaryrefslogtreecommitdiff
path: root/src/files.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/files.rs')
-rw-r--r--src/files.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/files.rs b/src/files.rs
index ecf9b52..0b5bc3f 100644
--- a/src/files.rs
+++ b/src/files.rs
@@ -11,12 +11,12 @@ use crate::{
11 db::{mods_get_info, userlist_add_disabled_versions}, 11 db::{mods_get_info, userlist_add_disabled_versions},
12 error::{ErrorType, MLError, MLE}, 12 error::{ErrorType, MLError, MLE},
13 modrinth::Version, 13 modrinth::Version,
14 List, cache::{get_cached_versions, copy_cached_version}, devdir, 14 List, cache::{get_cached_versions, copy_cached_version},
15}; 15};
16 16
17pub async fn download_versions(list: List, config: Cfg, versions: Vec<Version>) -> MLE<String> { 17pub async fn download_versions(list: List, config: Cfg, versions: Vec<Version>) -> MLE<String> {
18 18
19 let mut cached = get_cached_versions(&devdir(&config.cache)); 19 let mut cached = get_cached_versions(&config.cache);
20 20
21 println!("{:#?}", cached); 21 println!("{:#?}", cached);
22 22
@@ -59,7 +59,7 @@ pub async fn download_versions(list: List, config: Cfg, versions: Vec<Version>)
59 //Force flush of stdout, else print! doesn't print instantly 59 //Force flush of stdout, else print! doesn't print instantly
60 std::io::stdout().flush().unwrap(); 60 std::io::stdout().flush().unwrap();
61 let dl_path_file = format!("{}/{}", list.download_folder, filename); 61 let dl_path_file = format!("{}/{}", list.download_folder, filename);
62 let cache_path = format!("{}/{}", devdir(&config.clone().cache), filename); 62 let cache_path = format!("{}/{}", &config.clone().cache, filename);
63 // println!("{}:{}", dl_path_file, cache_path); 63 // println!("{}:{}", dl_path_file, cache_path);
64 copy(dl_path_file, cache_path)?; 64 copy(dl_path_file, cache_path)?;
65 println!(" ✓"); 65 println!(" ✓");