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/lib.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/lib.rs')
-rw-r--r-- | src/lib.rs | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -6,7 +6,7 @@ pub mod error; | |||
6 | pub mod files; | 6 | pub mod files; |
7 | pub mod cache; | 7 | pub mod cache; |
8 | 8 | ||
9 | use std::{fmt::Display, path::Path}; | 9 | use std::fmt::Display; |
10 | 10 | ||
11 | pub use apis::*; | 11 | pub use apis::*; |
12 | pub use commands::*; | 12 | pub use commands::*; |
@@ -36,17 +36,3 @@ impl Display for Modloader { | |||
36 | } | 36 | } |
37 | } | 37 | } |
38 | } | 38 | } |
39 | |||
40 | pub fn devdir(path: &str) -> String { | ||
41 | let p = Path::new(path); | ||
42 | let dev = std::env::var("DEV"); | ||
43 | let lvl = match dev { | ||
44 | Ok(dev) => dev.parse::<i32>().unwrap(), | ||
45 | Err(..) => 0, | ||
46 | }; | ||
47 | if lvl >= 1 { | ||
48 | format!("./dev/{}", p.file_name().unwrap().to_str().unwrap()) | ||
49 | } else { | ||
50 | String::from(path) | ||
51 | } | ||
52 | } | ||