SETTINGS_MANAGER::SaveColorSettings(): Ensure the destination folder exists.
For new users, this folder noes not exists, and saving colors does not work. If this folder does not exist, it is not created.
This commit is contained in:
parent
800d8acb00
commit
a0df876d58
|
@ -326,6 +326,10 @@ void SETTINGS_MANAGER::SaveColorSettings( COLOR_SETTINGS* aSettings, const std::
|
|||
( *aSettings )[ptr].update( backup );
|
||||
aSettings->Load();
|
||||
|
||||
// Ensure the folder to store the config exists:
|
||||
if( !wxDir::Exists( SETTINGS_MANAGER::GetColorSettingsPath() ) )
|
||||
wxDir::Make( SETTINGS_MANAGER::GetColorSettingsPath() );
|
||||
|
||||
aSettings->SaveToFile( path, true );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue