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

(cherry picked from commit a855be28fa)
This commit is contained in:
Marek Roszko 2022-07-21 23:18:07 -04:00 committed by Roberto Fernandez Bautista
parent 7f1c2461b5
commit d57caf2ad7
1 changed files with 4 additions and 4 deletions

View File

@ -372,8 +372,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, wxT( "repository.json" ) );
repo_cache.AppendDir( wxT( "cache" ) );
wxFileName repo_cache = wxFileName( PATHS::GetUserCachePath(), wxT( "repository.json" ) );
repo_cache.AppendDir( wxT( "pcm" ) );
repo_cache.AppendDir( aRepositoryId );
wxFileName packages_cache( repo_cache.GetPath(), wxT( "packages.json" ) );
@ -794,8 +794,8 @@ PLUGIN_CONTENT_MANAGER::GetRepositoryPackageBitmaps( const wxString& aRepository
{
std::unordered_map<wxString, wxBitmap> bitmaps;
wxFileName resources_file = wxFileName( m_3rdparty_path, wxT( "resources.zip" ) );
resources_file.AppendDir( wxT( "cache" ) );
wxFileName resources_file = wxFileName( PATHS::GetUserCachePath(), wxT( "resources.zip" ) );
resources_file.AppendDir( wxT( "pcm" ) );
resources_file.AppendDir( aRepositoryId );
if( !resources_file.FileExists() )