use same ways to get homedir for both linux and macOS

This commit is contained in:
sqshq 2019-08-04 00:48:46 -04:00
parent 551e3f029a
commit edc4ab7ba4
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ func fileExists(filename string) bool {
func getPlatformStoragePath(filename string) string { func getPlatformStoragePath(filename string) string {
switch runtime.GOOS { switch runtime.GOOS {
case "darwin": case "darwin":
home, _ := os.UserHomeDir() home, _ := homedir.Dir()
return filepath.Join(home, macOSDir, filename) return filepath.Join(home, macOSDir, filename)
case "windows": case "windows":
cache, _ := os.UserCacheDir() cache, _ := os.UserCacheDir()