fix config dir detection
This commit is contained in:
10
tools.go
10
tools.go
@@ -160,12 +160,12 @@ func oldConfigDir() (string, error) {
|
||||
}
|
||||
|
||||
func configDir() string {
|
||||
if os.Getenv("XDG_CONFIG_HOME") != "" {
|
||||
dir := path.Join(os.Getenv("XDG_CONFIG_HOME"), "nwg-drawer")
|
||||
createDir(dir)
|
||||
return dir
|
||||
var home string
|
||||
home = os.Getenv("XDG_CONFIG_HOME")
|
||||
if home == "" {
|
||||
home = os.Getenv("HOME")
|
||||
}
|
||||
dir := path.Join(os.Getenv("XDG_CONFIG_HOME"), "nwg-drawe")
|
||||
dir := path.Join(home, ".config/nwg-drawer")
|
||||
createDir(dir)
|
||||
|
||||
return dir
|
||||
|
||||
Reference in New Issue
Block a user