From 292b02d4a0574b23f0d910905ac576cae2eec2fa Mon Sep 17 00:00:00 2001 From: diginatu Date: Sat, 18 Nov 2017 13:40:04 +0900 Subject: [PATCH] fix wasn't able to compile in windows --- viewer/user_path.go | 4 ++-- viewer/user_path_windows.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/viewer/user_path.go b/viewer/user_path.go index 53bcb91..1d9415c 100644 --- a/viewer/user_path.go +++ b/viewer/user_path.go @@ -9,7 +9,7 @@ import ( func findUserConfigPath(appname string) string { home := os.Getenv("HOME") - dir := filepath.Join(home, ".config") + dir := filepath.Join(home, ".config", appname) - return filepath.Join(dir, appname) + return dir } diff --git a/viewer/user_path_windows.go b/viewer/user_path_windows.go index 87e829c..a706ab8 100644 --- a/viewer/user_path_windows.go +++ b/viewer/user_path_windows.go @@ -5,12 +5,12 @@ import ( "path/filepath" ) -func findUserConfigPath() string { +func findUserConfigPath(appname string) string { home := os.Getenv("USERPROFILE") dir := os.Getenv("APPDATA") if dir == "" { dir = filepath.Join(home, "Application Data") } - return filepath.Join(dir, AppName) + return filepath.Join(dir, appname) }