()
| 11 | } |
| 12 | |
| 13 | pub fn init() { |
| 14 | if let Some(dirs) = ProjectDirs::from("", "Freaky", "Compactor") { |
| 15 | pathdb() |
| 16 | .write() |
| 17 | .unwrap() |
| 18 | .set_backing(dirs.cache_dir().join("incompressible.dat")); |
| 19 | *config().write().unwrap() = ConfigFile::new(dirs.config_dir().join("config.json")); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | pub fn config() -> &'static RwLock<ConfigFile> { |
| 24 | &CONFIG |
no test coverage detected