Save config in user's home, not root directory

This commit is contained in:
Chris Johnson 2019-08-02 21:45:46 -04:00 committed by GitHub
parent 1a6a1d25b7
commit d5e7d72a6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,8 @@ func getPlatformStoragePath(filename string) string {
cache, _ := os.UserCacheDir() cache, _ := os.UserCacheDir()
return filepath.Join(cache, windowsDir, filename) return filepath.Join(cache, windowsDir, filename)
default: default:
return filepath.Join(linuxDir, filename) home, _ := os.UserHomeDir()
return filepath.Join(home, linuxDir, filename)
} }
} }