()
| 1190 | /// `HOME`/`USERPROFILE`. `pub` only for cross-crate reuse by the gateway. |
| 1191 | #[doc(hidden)] |
| 1192 | pub fn user_config_dir() -> Option<PathBuf> { |
| 1193 | if let Some(base) = std::env::var_os("XDG_CONFIG_HOME") { |
| 1194 | return Some(PathBuf::from(base).join("nemo-relay")); |
| 1195 | } |
| 1196 | std::env::var_os("HOME") |
| 1197 | .or_else(|| std::env::var_os("USERPROFILE")) |
| 1198 | .map(|home| PathBuf::from(home).join(".config/nemo-relay")) |
| 1199 | } |
| 1200 | |
| 1201 | /// Deregisters and clears all configured plugin components. |
| 1202 | /// |
no test coverage detected