diff --git a/common/systemdirsappend.cpp b/common/systemdirsappend.cpp index 58f251dc8d..78f05dc35e 100644 --- a/common/systemdirsappend.cpp +++ b/common/systemdirsappend.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include // to define DEFAULT_INSTALL_PATH @@ -70,7 +71,7 @@ void SystemDirsAppend( SEARCH_STACK* aSearchStack ) // According to wxWidgets documentation: // Unix: ~/.appname // Windows: C:\Documents and Settings\username\Application Data\appname - maybe.AddPaths( wxStandardPaths::Get().GetUserDataDir() ); + maybe.AddPaths( KIPLATFORM::ENV::GetDocumentsPath() ); { // Should be full path to this program executable. diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 92fc5e876a..53c91ae35e 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -126,6 +127,8 @@ bool PGM_KICAD::OnPgmInit() m_bm.m_search.AddPaths( fn.GetPath() ); } + m_bm.m_search.AddPaths( PATHS::GetUserTemplatesPath() ); + // The KICAD6_TEMPLATE_DIR takes precedence over the search stack template path. ENV_VAR_MAP_CITER it = GetLocalEnvVariables().find( "KICAD6_TEMPLATE_DIR" );