mirror of
https://github.com/Jguer/yay
synced 2024-10-07 00:29:10 +00:00
Use more filepath.Join, standardize separators
This commit is contained in:
parent
408f3e138f
commit
ba4ef4f51c
4
main.go
4
main.go
|
@ -13,7 +13,7 @@ import (
|
|||
func initPaths() {
|
||||
if configHome = os.Getenv("XDG_CONFIG_HOME"); configHome != "" {
|
||||
if info, err := os.Stat(configHome); err == nil && info.IsDir() {
|
||||
configHome = configHome + "/yay"
|
||||
configHome = filepath.Join(configHome, "yay")
|
||||
} else {
|
||||
configHome = filepath.Join(os.Getenv("HOME"), ".config/yay")
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ func initPaths() {
|
|||
cacheHome = filepath.Join(os.Getenv("HOME"), ".cache/yay")
|
||||
}
|
||||
} else {
|
||||
cacheHome = filepath.Join(os.Getenv("HOME"), "/.cache/yay")
|
||||
cacheHome = filepath.Join(os.Getenv("HOME"), ".cache/yay")
|
||||
}
|
||||
|
||||
configFile = filepath.Join(configHome, configFileName)
|
||||
|
|
Loading…
Reference in a new issue