diff options
author | fx <[email protected]> | 2023-04-27 10:10:03 +0200 |
---|---|---|
committer | fx <[email protected]> | 2023-04-27 10:10:03 +0200 |
commit | 43ca5fec20933fc31dfe7d7dbd1f1b9258612219 (patch) | |
tree | eef58fecfadad90386b38af581abab8cc3d3cfc0 /src/lib.rs | |
parent | 4300ad2eb05dddfa4274e04b204f2ad28c87da05 (diff) | |
parent | 4e6466af1329f7b9e341df2e76ab696d11f80c93 (diff) | |
download | modlist-43ca5fec20933fc31dfe7d7dbd1f1b9258612219.tar modlist-43ca5fec20933fc31dfe7d7dbd1f1b9258612219.tar.gz modlist-43ca5fec20933fc31dfe7d7dbd1f1b9258612219.zip |
Merge pull request 'cache' (#3) from cache into master
Reviewed-on: http://raspberrypi.fritz.box:7920/fx/modlist/pulls/3
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 17 |
1 files changed, 2 insertions, 15 deletions
@@ -1,11 +1,12 @@ | |||
1 | pub mod apis; | 1 | pub mod apis; |
2 | pub mod cache; | ||
2 | pub mod commands; | 3 | pub mod commands; |
3 | pub mod config; | 4 | pub mod config; |
4 | pub mod db; | 5 | pub mod db; |
5 | pub mod error; | 6 | pub mod error; |
6 | pub mod files; | 7 | pub mod files; |
7 | 8 | ||
8 | use std::{fmt::Display, path::Path}; | 9 | use std::fmt::Display; |
9 | 10 | ||
10 | pub use apis::*; | 11 | pub use apis::*; |
11 | pub use commands::*; | 12 | pub use commands::*; |
@@ -35,17 +36,3 @@ impl Display for Modloader { | |||
35 | } | 36 | } |
36 | } | 37 | } |
37 | } | 38 | } |
38 | |||
39 | pub fn devdir(path: &str) -> String { | ||
40 | let p = Path::new(path); | ||
41 | let dev = std::env::var("DEV"); | ||
42 | let lvl = match dev { | ||
43 | Ok(dev) => dev.parse::<i32>().unwrap(), | ||
44 | Err(..) => 0, | ||
45 | }; | ||
46 | if lvl >= 1 { | ||
47 | format!("./dev/{}", p.file_name().unwrap().to_str().unwrap()) | ||
48 | } else { | ||
49 | String::from(path) | ||
50 | } | ||
51 | } | ||