diff --git a/bin/nwg-drawer b/bin/nwg-drawer index aa0bb03..47ffd6b 100755 Binary files a/bin/nwg-drawer and b/bin/nwg-drawer differ diff --git a/main.go b/main.go index 4bf3852..e5d0dec 100644 --- a/main.go +++ b/main.go @@ -274,10 +274,10 @@ func main() { exFile := filepath.Join(configDirectory, "excluded-dirs") exclusions, err = loadTextFile(exFile) if err != nil { - log.Infof("Search exclusions file %s not found", exFile) + log.Infof("Search exclusions file %s not found %s", exFile, err) } else { log.Infof("Found %v search exclusions in %s", len(exclusions), exFile) - fmt.Println(exclusions) + log.Info(exclusions) } // USER INTERFACE diff --git a/tools.go b/tools.go index 3a3ca42..7905315 100644 --- a/tools.go +++ b/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