Skip to content

Commit b9fc128

Browse files
committed
Switch back to $XDG_CONFIG_HOME
1 parent e1b197b commit b9fc128

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
//! the operating system.
147147
//!
148148
//! * Mac OS X: `~/Library/Application Support`
149-
//! * Other Unix/Linux: `$XDG_DATA_HOME`, defaulting to `~/.local/share` if not set
149+
//! * Other Unix/Linux: `$XDG_CONFIG_HOME`, defaulting to `~/.config` if not set
150150
//! * Windows: `%APPDATA%`, defaulting to `<std::env::home_dir()>\AppData\Roaming` if not set
151151
//!
152152
//! The data is stored in JSON format. This has several advantages:
@@ -196,11 +196,11 @@ fn get_prefs_base_path() -> Option<PathBuf> {
196196

197197
#[cfg(all(unix, not(target_os="macos")))]
198198
fn get_prefs_base_path() -> Option<PathBuf> {
199-
match env::var("XDG_DATA_HOME") {
199+
match env::var("XDG_CONFIG_HOME") {
200200
Ok(path_str) => Some(path_str.into()),
201201
Err(..) => {
202202
env::home_dir().map(|mut dir| {
203-
dir.push(".local/share");
203+
dir.push(".config");
204204
dir
205205
})
206206
}

0 commit comments

Comments
 (0)