diff --git a/internal/installation/storage/storage.go b/internal/installation/storage/storage.go index cfc1772617..dde30e6ca5 100644 --- a/internal/installation/storage/storage.go +++ b/internal/installation/storage/storage.go @@ -105,7 +105,13 @@ func CachePath() string { return path } - return filepath.Join(BaseCachePath(), relativeCachePath()) + cachePath = filepath.Join(BaseCachePath(), relativeCachePath()) + if runtime.GOOS == "windows" { + // Explicitly append "cache" dir as the cachedir on Windows. + // It is the same as the local appdata dir (conflicts with config) + cachePath = filepath.Join(cachePath, "cache") + } + return cachePath } func GlobalBinDir() string { diff --git a/internal/installation/storage/storage_windows.go b/internal/installation/storage/storage_windows.go index 4a4986440a..861b69075d 100644 --- a/internal/installation/storage/storage_windows.go +++ b/internal/installation/storage/storage_windows.go @@ -18,5 +18,5 @@ func BaseCachePath() string { return cache } - return filepath.Join(homeDir, "AppData", "Local", "cache") + return filepath.Join(homeDir, "AppData", "Local") }