Move the PCM download cache to PATHS::GetUserCachePath

Second commit for https://gitlab.com/kicad/code/kicad/-/issues/10165

(cherry picked from commit 097f30a272)
This commit is contained in:
Mark Roszko 2022-07-22 14:40:55 +00:00 committed by Roberto Fernandez Bautista
parent d57caf2ad7
commit 87a8e69632
1 changed files with 5 additions and 4 deletions

View File

@ -22,9 +22,10 @@
#include <kicad_curl/kicad_curl.h>
#include "kicad_curl/kicad_curl_easy.h"
#include <paths.h>
#include "pcm_task_manager.h"
#include "reporter.h"
#include "wxstream_helper.h"
#include <reporter.h>
#include <wxstream_helper.h>
#include <fstream>
#include <thread>
@ -42,8 +43,8 @@ void PCM_TASK_MANAGER::DownloadAndInstall( const PCM_PACKAGE& aPackage, const wx
{
PCM_TASK download_task = [aPackage, aVersion, aRepositoryId, this]()
{
wxFileName file_path( m_pcm->Get3rdPartyPath(), "" );
file_path.AppendDir( wxT( "cache" ) );
wxFileName file_path( PATHS::GetUserCachePath(), "" );
file_path.AppendDir( wxT( "pcm" ) );
file_path.SetFullName( wxString::Format( wxT( "%s_v%s.zip" ), aPackage.identifier, aVersion ) );
auto find_pkgver = std::find_if( aPackage.versions.begin(), aPackage.versions.end(),