parent
ff54b8c718
commit
7473528cf4
|
@ -341,7 +341,7 @@ wxString PATHS::GetDocumentationPath()
|
|||
bool PATHS::EnsurePathExists( const wxString& aPath )
|
||||
{
|
||||
wxFileName path( aPath );
|
||||
if( !path.Normalize() )
|
||||
if( !path.MakeAbsolute() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -360,6 +360,7 @@ bool PATHS::EnsurePathExists( const wxString& aPath )
|
|||
|
||||
void PATHS::EnsureUserPathsExist()
|
||||
{
|
||||
EnsurePathExists( GetUserCachePath() );
|
||||
EnsurePathExists( GetUserPluginsPath() );
|
||||
EnsurePathExists( GetUserPlugins3DPath() );
|
||||
EnsurePathExists( GetUserScriptingPath() );
|
||||
|
@ -428,7 +429,7 @@ wxString PATHS::GetOSXKicadDataDir()
|
|||
wxString PATHS::getWindowsKiCadRoot()
|
||||
{
|
||||
wxFileName root( Pgm().GetExecutablePath() + wxT( "/../" ) );
|
||||
root.Normalize();
|
||||
root.MakeAbsolute();
|
||||
|
||||
return root.GetPathWithSep();
|
||||
}
|
||||
|
|
|
@ -367,6 +367,10 @@ void PGM_BASE::sentryPrompt()
|
|||
|
||||
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
|
||||
sentryInit();
|
||||
#endif
|
||||
|
|
|
@ -55,8 +55,6 @@ SETTINGS_MANAGER::SETTINGS_MANAGER( bool aHeadless ) :
|
|||
m_migration_source(),
|
||||
m_migrateLibraryTables( true )
|
||||
{
|
||||
PATHS::EnsureUserPathsExist();
|
||||
|
||||
// Check if the settings directory already exists, and if not, perform a migration if possible
|
||||
if( !MigrateIfNeeded() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue