summaryrefslogtreecommitdiff
path: root/src/commands/setup.rs
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2022-12-28 13:15:10 +0100
committerfxqnlr <[email protected]>2022-12-28 13:15:10 +0100
commit5326d48f6e0a88ad42005c39b73f7baaf91c9b86 (patch)
tree154ff8715a2e0f121b285870d52c50f1737f7abc /src/commands/setup.rs
parente1c79889d3bf02c8d131d642fed8ba7ef9521bf4 (diff)
downloadmodlist-5326d48f6e0a88ad42005c39b73f7baaf91c9b86.tar
modlist-5326d48f6e0a88ad42005c39b73f7baaf91c9b86.tar.gz
modlist-5326d48f6e0a88ad42005c39b73f7baaf91c9b86.zip
added devdir; better config dir
Diffstat (limited to 'src/commands/setup.rs')
-rw-r--r--src/commands/setup.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/setup.rs b/src/commands/setup.rs
index c7f1bed..e4fa801 100644
--- a/src/commands/setup.rs
+++ b/src/commands/setup.rs
@@ -1,9 +1,9 @@
1use std::{fs::File, path::Path, io::{Error, ErrorKind}}; 1use std::{fs::File, path::Path, io::{Error, ErrorKind}};
2 2
3use crate::{config::Cfg, db::{db_setup, s_config_get_version, s_config_create_version, s_insert_column, lists_get_all_ids, lists_get, userlist_get_all_current_version_ids, s_userlist_update_download, s_config_update_version}, modrinth::get_raw_versions}; 3use crate::{config::Cfg, db::{db_setup, s_config_get_version, s_config_create_version, s_insert_column, lists_get_all_ids, lists_get, userlist_get_all_current_version_ids, s_userlist_update_download, s_config_update_version}, modrinth::get_raw_versions, devdir};
4 4
5pub async fn setup(config: Cfg) -> Result<(), Box<dyn std::error::Error>> { 5pub async fn setup(config: Cfg) -> Result<(), Box<dyn std::error::Error>> {
6 let db_file = format!("{}/data.db", String::from(&config.data)); 6 let db_file = devdir(format!("{}/data.db", config.data).as_str());
7 7
8 if !Path::new(&db_file).exists() { 8 if !Path::new(&db_file).exists() {
9 return create(config, db_file); 9 return create(config, db_file);