use same ways to get homedir for both linux and macOS
This commit is contained in:
parent
551e3f029a
commit
edc4ab7ba4
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue