diff --git a/common/paths.cpp b/common/paths.cpp index fee74be29b..bc50550768 100644 --- a/common/paths.cpp +++ b/common/paths.cpp @@ -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(); } diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp index 506659d2cf..7170994e96 100644 --- a/common/pgm_base.cpp +++ b/common/pgm_base.cpp @@ -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 diff --git a/common/settings/settings_manager.cpp b/common/settings/settings_manager.cpp index 4d430a6d83..8ccf4d3770 100644 --- a/common/settings/settings_manager.cpp +++ b/common/settings/settings_manager.cpp @@ -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() ) {