summaryrefslogtreecommitdiff
path: root/src/commands/setup.rs
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2023-04-23 21:47:37 +0200
committerfxqnlr <[email protected]>2023-04-23 21:47:37 +0200
commit3e65975227baa511f570e8223fccda5607cf905e (patch)
treef852fd5cc3b26a004cf7bfab054e86c0d74c4669 /src/commands/setup.rs
parent416f4dc383ff5a1194da3a5532a8e159a4a1dac0 (diff)
downloadmodlist-3e65975227baa511f570e8223fccda5607cf905e.tar
modlist-3e65975227baa511f570e8223fccda5607cf905e.tar.gz
modlist-3e65975227baa511f570e8223fccda5607cf905e.zip
added config argument, remove devdir
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 40e8c0a..34da2f8 100644
--- a/src/commands/setup.rs
+++ b/src/commands/setup.rs
@@ -1,9 +1,9 @@
1use std::{fs::File, path::Path}; 1use std::{fs::File, path::Path};
2 2
3use crate::{config::Cfg, db::db_setup, devdir, error::MLE}; 3use crate::{config::Cfg, db::db_setup, error::MLE};
4 4
5pub async fn setup(config: Cfg) -> MLE<()> { 5pub async fn setup(config: Cfg) -> MLE<()> {
6 let db_file = devdir(format!("{}/data.db", config.data).as_str()); 6 let db_file = format!("{}/data.db", config.data);
7 7
8 if !Path::new(&db_file).exists() { 8 if !Path::new(&db_file).exists() {
9 create(config, db_file)?; 9 create(config, db_file)?;