diff options
author | fx <[email protected]> | 2023-04-23 21:57:09 +0200 |
---|---|---|
committer | fx <[email protected]> | 2023-04-23 21:57:09 +0200 |
commit | 99c84b5a81f395f4f094b157019e84bfc4459df6 (patch) | |
tree | f852fd5cc3b26a004cf7bfab054e86c0d74c4669 /src/commands/setup.rs | |
parent | 416f4dc383ff5a1194da3a5532a8e159a4a1dac0 (diff) | |
parent | 3e65975227baa511f570e8223fccda5607cf905e (diff) | |
download | modlist-99c84b5a81f395f4f094b157019e84bfc4459df6.tar modlist-99c84b5a81f395f4f094b157019e84bfc4459df6.tar.gz modlist-99c84b5a81f395f4f094b157019e84bfc4459df6.zip |
Merge pull request 'added config argument, remove devdir' (#2) from dev into cache
Reviewed-on: http://raspberrypi.fritz.box:7920/fx/modlist/pulls/2
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 40e8c0a..34da2f8 100644 --- a/src/commands/setup.rs +++ b/src/commands/setup.rs | |||
@@ -1,9 +1,9 @@ | |||
1 | use std::{fs::File, path::Path}; | 1 | use std::{fs::File, path::Path}; |
2 | 2 | ||
3 | use crate::{config::Cfg, db::db_setup, devdir, error::MLE}; | 3 | use crate::{config::Cfg, db::db_setup, error::MLE}; |
4 | 4 | ||
5 | pub async fn setup(config: Cfg) -> MLE<()> { | 5 | pub 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)?; |