diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-11-01 22:03:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-01 22:03:29 -0500 |
commit | 309ebd8dc3ba35f80c93a296ebc688813e988d03 (patch) | |
tree | cb28f5d50090a2ac12fbbc8f4801e2f05fabf395 /src | |
parent | 7e16e3467b930bc829645eb26f000dca4e38c34a (diff) |
deps: switch from dirs to dirs-next (#285)
Addresses RUSTSEC-2020-0053.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -184,14 +184,14 @@ pub fn read_config(config_location: Option<&str>) -> error::Result<Option<PathBu let config_path = if let Some(conf_loc) = config_location { Some(PathBuf::from(conf_loc)) } else if cfg!(target_os = "windows") { - if let Some(home_path) = dirs::config_dir() { + if let Some(home_path) = dirs_next::config_dir() { let mut path = home_path; path.push(DEFAULT_CONFIG_FILE_PATH); Some(path) } else { None } - } else if let Some(home_path) = dirs::home_dir() { + } else if let Some(home_path) = dirs_next::home_dir() { let mut path = home_path; path.push(".config/"); path.push(DEFAULT_CONFIG_FILE_PATH); @@ -200,7 +200,7 @@ pub fn read_config(config_location: Option<&str>) -> error::Result<Option<PathBu Some(path) } else { // If it does not, use the new one! - if let Some(config_path) = dirs::config_dir() { + if let Some(config_path) = dirs_next::config_dir() { let mut path = config_path; path.push(DEFAULT_CONFIG_FILE_PATH); Some(path) |