summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ignore/src/gitignore.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ignore/src/gitignore.rs b/ignore/src/gitignore.rs
index 6a0bc969..7e547c2c 100644
--- a/ignore/src/gitignore.rs
+++ b/ignore/src/gitignore.rs
@@ -454,7 +454,7 @@ fn gitconfig_contents() -> Option<Vec<u8>> {
fn excludes_file_default() -> Option<PathBuf> {
env::var_os("XDG_CONFIG_HOME")
.and_then(|x| if x.is_empty() { None } else { Some(PathBuf::from(x)) })
- .or_else(|| env::home_dir())
+ .or_else(|| env::home_dir().map(|p| p.join(".config")))
.map(|x| x.join("git/ignore"))
}