diff options
Diffstat (limited to 'src/commands/setup.rs')
-rw-r--r-- | src/commands/setup.rs | 4 |
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 @@ | |||
1 | use std::{fs::File, path::Path, io::{Error, ErrorKind}}; | 1 | use std::{fs::File, path::Path, io::{Error, ErrorKind}}; |
2 | 2 | ||
3 | use 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}; | 3 | use 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 | ||
5 | pub async fn setup(config: Cfg) -> Result<(), Box<dyn std::error::Error>> { | 5 | pub 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); |