Allow overriding documents home with an env var
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7543
This commit is contained in:
parent
114043fe93
commit
13a91dd49d
|
@ -37,7 +37,13 @@
|
||||||
|
|
||||||
void PATHS::getUserDocumentPath( wxFileName& aPath )
|
void PATHS::getUserDocumentPath( wxFileName& aPath )
|
||||||
{
|
{
|
||||||
aPath.AssignDir( KIPLATFORM::ENV::GetDocumentsPath() );
|
wxString envPath;
|
||||||
|
|
||||||
|
if( wxGetEnv( wxT( "KICAD_DOCUMENTS_HOME" ), &envPath ) )
|
||||||
|
aPath.AssignDir( envPath );
|
||||||
|
else
|
||||||
|
aPath.AssignDir( KIPLATFORM::ENV::GetDocumentsPath() );
|
||||||
|
|
||||||
aPath.AppendDir( KICAD_PATH_STR );
|
aPath.AppendDir( KICAD_PATH_STR );
|
||||||
aPath.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
aPath.AppendDir( SETTINGS_MANAGER::GetSettingsVersion() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue