diff --git a/common/settings/color_settings.cpp b/common/settings/color_settings.cpp index 442740fe22..e4cf4aaaf2 100644 --- a/common/settings/color_settings.cpp +++ b/common/settings/color_settings.cpp @@ -254,6 +254,9 @@ COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename, bool aAbsolutePath ) return true; } ); + + // this bump shouldn't have happened; add a no-op migration to avoid future issues + registerMigration( 4, 5, []() { return true; } ); } @@ -320,9 +323,10 @@ bool COLOR_SETTINGS::migrateSchema0to1() return true; } - wxString filename = m_filename + wxT( "_footprints" ); + wxString filename = GetFilename().BeforeLast( '.' ) + wxT( "_footprints" ); COLOR_SETTINGS* fpsettings = m_manager->AddNewColorSettings( filename ); + fpsettings->SetLocation( GetLocation() ); // Start out with a clone fpsettings->m_internals->CloneFrom( *m_internals ); diff --git a/common/settings/json_settings.cpp b/common/settings/json_settings.cpp index ae6c9c2d34..28734fdd53 100644 --- a/common/settings/json_settings.cpp +++ b/common/settings/json_settings.cpp @@ -109,6 +109,9 @@ JSON_SETTINGS::~JSON_SETTINGS() wxString JSON_SETTINGS::GetFullFilename() const { + if( m_filename.BeforeLast( '.' ) == getFileExt() ) + return m_filename; + return wxString( m_filename + "." + getFileExt() ); }