Pcbnew: fix incorrect creation of scripting/plugins in user directory.
Initialize Python scripting even if this directory cannot be created It is not a mandatory dir, and not initializing python scripting can create crashes. Fixes #5667 https://gitlab.com/kicad/code/kicad/issues/5667
This commit is contained in:
parent
a1439881b7
commit
e8d09cd998
|
@ -284,12 +284,9 @@ static bool scriptingSetup()
|
|||
wxFileName path( PyPluginsPath( true ) + wxT("/") );
|
||||
|
||||
// Ensure the user plugin path exists, and create it if not.
|
||||
if( !path.DirExists() && !path.Mkdir() )
|
||||
{
|
||||
wxLogDebug( "Warning: could not create user scripting path %s",
|
||||
path.GetPath() );
|
||||
return false;
|
||||
}
|
||||
// However, if it cannot be created, this is not a fatal error.
|
||||
if( !path.DirExists() && !path.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) )
|
||||
wxLogError( "Warning: could not create user scripting path %s", path.GetPath() );
|
||||
|
||||
if( !pcbnewInitPythonScripting( TO_UTF8( PyScriptingPath() ) ) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue