1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 16:40:07 +02:00

Bug 2470 - Linux/Mac: Modules may not be found if earlier version failed

This commit is contained in:
Leland Lucius 2020-06-15 20:06:33 -05:00
parent d31db975ee
commit 456177a66d

View File

@ -171,7 +171,6 @@ int ModulePrefs::GetModuleStatus(const FilePath &fname)
int iStatus = kModuleNew; int iStatus = kModuleNew;
wxFileName FileName( fname ); wxFileName FileName( fname );
wxDateTime DateTime = FileName.GetModificationTime();
wxString ShortName = FileName.GetName().Lower(); wxString ShortName = FileName.GetName().Lower();
wxString PathPref = wxString( wxT("/ModulePath/") ) + ShortName; wxString PathPref = wxString( wxT("/ModulePath/") ) + ShortName;
@ -183,9 +182,14 @@ int ModulePrefs::GetModuleStatus(const FilePath &fname)
{ {
gPrefs->Read( StatusPref, &iStatus, kModuleNew ); gPrefs->Read( StatusPref, &iStatus, kModuleNew );
wxDateTime DateTime = FileName.GetModificationTime();
wxDateTime OldDateTime; wxDateTime OldDateTime;
OldDateTime.ParseISOCombined( gPrefs->Read( DateTimePref, wxEmptyString ) ); OldDateTime.ParseISOCombined( gPrefs->Read( DateTimePref, wxEmptyString ) );
// Some platforms return milliseconds, some do not...level the playing field
DateTime.SetMillisecond( 0 );
OldDateTime.SetMillisecond( 0 );
// fix up a bad status or reset for newer module // fix up a bad status or reset for newer module
if( iStatus > kModuleNew || !OldDateTime.IsEqualTo( DateTime ) ) if( iStatus > kModuleNew || !OldDateTime.IsEqualTo( DateTime ) )
{ {