1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-30 23:52:07 +03:00

Merge branch 'master' of github.com:schollz/croc

This commit is contained in:
Zack Scholl 2021-03-17 17:20:04 +00:00
commit 63ba28c9b0

View File

@ -131,6 +131,9 @@ func getConfigDir() (homedir string, err error) {
return
}
homedir = path.Join(homedir, ".config", "croc")
if xdgConfigHome, isSet := os.LookupEnv("XDG_CONFIG_HOME"); isSet {
homedir = path.Join(xdgConfigHome, "croc")
}
if _, err = os.Stat(homedir); os.IsNotExist(err) {
log.Debugf("creating home directory %s", homedir)
err = os.MkdirAll(homedir, 0700)