From 2d821216a8941a1be761ca36fe819cfb1dc6b04a Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Thu, 28 Jun 2018 19:45:59 +0300 Subject: [PATCH] read system-wide configuration on windows --- os_windows.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/os_windows.go b/os_windows.go index b54975f..0303c71 100644 --- a/os_windows.go +++ b/os_windows.go @@ -30,7 +30,10 @@ func init() { // remove domain prefix gUser.Username = strings.Split(gUser.Username, `\`)[1] - gConfigPaths = []string{filepath.Join(gUser.HomeDir, "AppData", "Local", "lf", "lfrc")} + gConfigPaths = []string{ + filepath.Join(os.Getenv("ProgramData"), "lf", "lfrc"), + filepath.Join(os.Getenv("LOCALAPPDATA"), "lf", "lfrc"), + } } func pauseCommand() *exec.Cmd {