parent
ff54b8c718
commit
7473528cf4
|
@ -341,7 +341,7 @@ wxString PATHS::GetDocumentationPath()
|
||||||
bool PATHS::EnsurePathExists( const wxString& aPath )
|
bool PATHS::EnsurePathExists( const wxString& aPath )
|
||||||
{
|
{
|
||||||
wxFileName path( aPath );
|
wxFileName path( aPath );
|
||||||
if( !path.Normalize() )
|
if( !path.MakeAbsolute() )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -360,6 +360,7 @@ bool PATHS::EnsurePathExists( const wxString& aPath )
|
||||||
|
|
||||||
void PATHS::EnsureUserPathsExist()
|
void PATHS::EnsureUserPathsExist()
|
||||||
{
|
{
|
||||||
|
EnsurePathExists( GetUserCachePath() );
|
||||||
EnsurePathExists( GetUserPluginsPath() );
|
EnsurePathExists( GetUserPluginsPath() );
|
||||||
EnsurePathExists( GetUserPlugins3DPath() );
|
EnsurePathExists( GetUserPlugins3DPath() );
|
||||||
EnsurePathExists( GetUserScriptingPath() );
|
EnsurePathExists( GetUserScriptingPath() );
|
||||||
|
@ -428,7 +429,7 @@ wxString PATHS::GetOSXKicadDataDir()
|
||||||
wxString PATHS::getWindowsKiCadRoot()
|
wxString PATHS::getWindowsKiCadRoot()
|
||||||
{
|
{
|
||||||
wxFileName root( Pgm().GetExecutablePath() + wxT( "/../" ) );
|
wxFileName root( Pgm().GetExecutablePath() + wxT( "/../" ) );
|
||||||
root.Normalize();
|
root.MakeAbsolute();
|
||||||
|
|
||||||
return root.GetPathWithSep();
|
return root.GetPathWithSep();
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,6 +367,10 @@ void PGM_BASE::sentryPrompt()
|
||||||
|
|
||||||
bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit )
|
bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit )
|
||||||
{
|
{
|
||||||
|
// Just make sure we init precreate any folders early for later code
|
||||||
|
// In particular, the user cache path is the most likely to be hit by startup code
|
||||||
|
PATHS::EnsureUserPathsExist();
|
||||||
|
|
||||||
#ifdef KICAD_USE_SENTRY
|
#ifdef KICAD_USE_SENTRY
|
||||||
sentryInit();
|
sentryInit();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -55,8 +55,6 @@ SETTINGS_MANAGER::SETTINGS_MANAGER( bool aHeadless ) :
|
||||||
m_migration_source(),
|
m_migration_source(),
|
||||||
m_migrateLibraryTables( true )
|
m_migrateLibraryTables( true )
|
||||||
{
|
{
|
||||||
PATHS::EnsureUserPathsExist();
|
|
||||||
|
|
||||||
// Check if the settings directory already exists, and if not, perform a migration if possible
|
// Check if the settings directory already exists, and if not, perform a migration if possible
|
||||||
if( !MigrateIfNeeded() )
|
if( !MigrateIfNeeded() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue