mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 08:59:28 +02:00
Bug 2470 - Modules may not be found if earlier version failed
This commit is contained in:
parent
e5968db44f
commit
815e655a5e
@ -169,13 +169,28 @@ int ModulePrefs::GetModuleStatus(const FilePath &fname){
|
||||
// Default status is NEW module, and we will ask once.
|
||||
int iStatus = kModuleNew;
|
||||
|
||||
wxString ShortName = wxFileName( fname ).GetName();
|
||||
wxString PrefName = wxString( wxT("/Module/") ) + ShortName.Lower();
|
||||
wxString ShortName = wxFileName( fname ).GetName().Lower();
|
||||
wxString PathPref = wxString( wxT("/ModulePath/") ) + ShortName;
|
||||
wxString StatusPref = wxString( wxT("/Module/") ) + ShortName;
|
||||
|
||||
wxString ModulePath = gPrefs->Read( PathPref, wxEmptyString );
|
||||
if( ModulePath.IsSameAs( fname ) )
|
||||
{
|
||||
gPrefs->Read( StatusPref, &iStatus, kModuleNew );
|
||||
|
||||
// fix up a bad status.
|
||||
if( iStatus > kModuleNew )
|
||||
{
|
||||
iStatus=kModuleNew;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove previously saved since it's no longer valid
|
||||
gPrefs->DeleteEntry( PathPref );
|
||||
gPrefs->DeleteEntry( StatusPref );
|
||||
}
|
||||
|
||||
gPrefs->Read( PrefName, &iStatus, kModuleNew );
|
||||
// fix up a bad status.
|
||||
if( iStatus > kModuleNew )
|
||||
iStatus=kModuleNew;
|
||||
return iStatus;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user