From ba4ef4f51ca78b9e180475de82121da0464e6b37 Mon Sep 17 00:00:00 2001 From: Jguer Date: Sat, 28 Apr 2018 12:12:41 +0100 Subject: [PATCH] Use more filepath.Join, standardize separators --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 608a4c31..8b05b961 100644 --- a/main.go +++ b/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)