From 49b6c11faf0af751196dd9dbb0337478b5b5ca7e Mon Sep 17 00:00:00 2001 From: Timon Ringwald Date: Wed, 17 Aug 2022 20:24:57 +0200 Subject: [PATCH] fixed bugs --- configfile.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configfile.go b/configfile.go index 6b0eeaa..9e1ffab 100644 --- a/configfile.go +++ b/configfile.go @@ -15,14 +15,13 @@ func Path(fileExtension string) (string, error) { paths := []string{ filepath.Join("/etc/", executableName, configFileName), filepath.Join("/etc/", configFileName), - filepath.Join("etc", configFileName), filepath.Join(userConfigDir, executableName, configFileName), filepath.Join(userConfigDir, configFileName), filepath.Clean(configFileName), } for _, path := range paths { - if _, err := os.Stat(path); err != nil { + if _, err := os.Stat(path); err == nil { return path, nil } }