[−][src]Function hm::config::ensure_config_dir
pub fn ensure_config_dir() -> Result<PathBuf, &'static str>
Make sure $XDG_CONFIG_DIR exists. On Linux and similar this is /home/<username>/.config; macOS /Users/<username>/.config.
Assuming it does exist or we can create it, stuff config.toml on the end of it
and return Ok(my_path_buf/config.toml)
.
This is safe because ensure_config_dir()
is called only after we already know
the user didn't specify a config.toml
path themselves. We must check our
default expected location for it.