diff options
author | fxqnlr <[email protected]> | 2022-12-28 13:15:10 +0100 |
---|---|---|
committer | fxqnlr <[email protected]> | 2022-12-28 13:15:10 +0100 |
commit | 5326d48f6e0a88ad42005c39b73f7baaf91c9b86 (patch) | |
tree | 154ff8715a2e0f121b285870d52c50f1737f7abc /src/commands/setup.rs | |
parent | e1c79889d3bf02c8d131d642fed8ba7ef9521bf4 (diff) | |
download | modlist-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.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); |