From a855be28fa435e0787c3dc8561b2ff40db1202e1 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Thu, 21 Jul 2022 23:18:07 -0400 Subject: [PATCH] Move the PCM cache to PATHS::GetUserCachePath It still remains that on Windows, Documents can be bounded to network or cloud storage. AppData\Local is intended for local PC caching. Fix https://gitlab.com/kicad/code/kicad/-/issues/10165 --- kicad/pcm/pcm.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kicad/pcm/pcm.cpp b/kicad/pcm/pcm.cpp index b7bc2c52e5..cade83e0a6 100644 --- a/kicad/pcm/pcm.cpp +++ b/kicad/pcm/pcm.cpp @@ -371,8 +371,8 @@ const bool PLUGIN_CONTENT_MANAGER::CacheRepository( const wxString& aRepositoryI bool packages_cache_exists = false; // First load repository data from local filesystem if available. - wxFileName repo_cache = wxFileName( m_3rdparty_path, "repository.json" ); - repo_cache.AppendDir( "cache" ); + wxFileName repo_cache = wxFileName( PATHS::GetUserCachePath(), "repository.json" ); + repo_cache.AppendDir( "pcm" ); repo_cache.AppendDir( aRepositoryId ); wxFileName packages_cache( repo_cache.GetPath(), "packages.json" ); @@ -839,8 +839,8 @@ PLUGIN_CONTENT_MANAGER::GetRepositoryPackageBitmaps( const wxString& aRepository { std::unordered_map bitmaps; - wxFileName resources_file = wxFileName( m_3rdparty_path, "resources.zip" ); - resources_file.AppendDir( "cache" ); + wxFileName resources_file = wxFileName( PATHS::GetUserCachePath(), "resources.zip" ); + resources_file.AppendDir( "pcm" ); resources_file.AppendDir( aRepositoryId ); if( !resources_file.FileExists() )