Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a1c7dcf63f |
@ -15,13 +15,14 @@ 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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user