From fdbc38042178339b9ea208a7e0ead51697a4fc60 Mon Sep 17 00:00:00 2001 From: James Houlahan Date: Mon, 16 Jan 2023 15:58:10 +0100 Subject: [PATCH] GODT-2251: Store gluon DB in user config rather than cache directory Gluon data was stored in the user's "data dir". This is ~/.local/share on linux, but was the user's "cache dir" on windows/mac. As a result, it would sometimes be deleted to reclaim disk space. This change ensures the "data dir" is persistent on windows/mac. --- internal/locations/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/locations/provider.go b/internal/locations/provider.go index 69f7e1a9..f0eca49a 100644 --- a/internal/locations/provider.go +++ b/internal/locations/provider.go @@ -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.UserCacheDir() + return os.UserConfigDir() } if dir := os.Getenv("XDG_DATA_HOME"); dir != "" {