SETTINGS_MANAGER: Don't try to retrieve system paths in headless mode

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5748
This commit is contained in:
Jon Evans 2020-09-22 18:57:19 -04:00
parent 8ef888e115
commit e8369c94df
1 changed files with 6 additions and 6 deletions

View File

@ -409,6 +409,12 @@ public:
bool SETTINGS_MANAGER::MigrateIfNeeded()
{
if( m_headless )
{
wxLogTrace( traceSettings, "Settings migration not checked; running headless" );
return false;
}
wxFileName path( GetUserSettingsPath(), "" );
wxLogTrace( traceSettings, "Using settings path %s", path.GetFullPath() );
@ -425,12 +431,6 @@ bool SETTINGS_MANAGER::MigrateIfNeeded()
}
}
if( m_headless )
{
wxLogTrace( traceSettings, "Manual settings migration required but running headless!" );
return false;
}
// Now we have an empty path, let's figure out what to put in it
DIALOG_MIGRATE_SETTINGS dlg( this );