From 5326d48f6e0a88ad42005c39b73f7baaf91c9b86 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Wed, 28 Dec 2022 13:15:10 +0100 Subject: added devdir; better config dir --- src/commands/setup.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/commands/setup.rs') 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 @@ use std::{fs::File, path::Path, io::{Error, ErrorKind}}; -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}; +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}; pub async fn setup(config: Cfg) -> Result<(), Box> { - let db_file = format!("{}/data.db", String::from(&config.data)); + let db_file = devdir(format!("{}/data.db", config.data).as_str()); if !Path::new(&db_file).exists() { return create(config, db_file); -- cgit v1.2.3