Use XDG_CONFIG_HOME on all unix except macos

This commit is contained in:
Curtis McEnroe 2018-03-12 21:34:48 -04:00
parent 20751cfa9a
commit afa051658b
No known key found for this signature in database
GPG key ID: CEA2F97ADCFCD77C

View file

@ -89,7 +89,7 @@ use std::time::Duration;
const DATA_FILE_URL: &'static str = "https://raw.githubusercontent.com/tiffany352/rink-rs/master/definitions.units";
#[cfg(target_os = "linux")]
#[cfg(all(target_family = "unix", not(target_os = "macos")))]
pub fn config_dir() -> Result<PathBuf, String> {
env::var("XDG_CONFIG_HOME")
.map(From::from)