Other: Use Cache rather than Config on non-linux OS for user data

This commit is contained in:
James Houlahan
2022-10-30 20:21:53 +01:00
parent 34e4625b64
commit 94f84625d4

View File

@ -96,7 +96,7 @@ func (p *DefaultProvider) UserCache() string {
// On non-linux systems, it is the same as os.UserConfigDir().
func userDataDir() (string, error) {
if runtime.GOOS != "linux" {
return os.UserConfigDir()
return os.UserCacheDir()
}
if dir := os.Getenv("XDG_DATA_HOME"); dir != "" {