Skip to content

Commit

Permalink
fix wasn't able to compile in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
diginatu committed Nov 18, 2017
1 parent 2ec93e4 commit 292b02d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions viewer/user_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions viewer/user_path_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 292b02d

Please sign in to comment.