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:
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user