Don't split legacy paths
The '.' is a valid character in the legacy preferences, not a separator. Also adds fail-safe catch for JSON throws Fixes https://gitlab.com/kicad/code/kicad/issues/10211
This commit is contained in:
parent
dec310f7f8
commit
a326d777f0
|
@ -534,7 +534,15 @@ bool EESCHEMA_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
|
|||
if( aCfg->Read( key, &value ) )
|
||||
{
|
||||
std::string key_utf( key.ToUTF8() );
|
||||
js[JSON_SETTINGS_INTERNALS::PointerFromString( key_utf )] = value;
|
||||
|
||||
try
|
||||
{
|
||||
js[key_utf] = value;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -547,7 +555,15 @@ bool EESCHEMA_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
|
|||
if( aCfg->Read( key, &value ) )
|
||||
{
|
||||
std::string key_utf( key.ToUTF8() );
|
||||
js[JSON_SETTINGS_INTERNALS::PointerFromString( key_utf )] = value;
|
||||
|
||||
try
|
||||
{
|
||||
js[key_utf] = value;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue