1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-17 14:11:13 +01:00

Fix bug where empty plugins.cfg causes a rescan.

This commit is contained in:
james.k.crook@gmail.com
2013-08-22 17:54:58 +00:00
parent 9107363b2b
commit 077e18372b

View File

@@ -72,18 +72,23 @@ void RegisterVSTEffects()
pm.Open();
if (gPrefs->Read(wxT("/VST/Rescan"), (long) false) != false) {
bool bScanRequired = false;
if (gPrefs->Read(wxT("/VST/Rescan"), (long)true) != false) {
pm.PurgeType(VSTPLUGINTYPE);
gPrefs->Write(wxT("/VST/Rescan"), false);
gPrefs->Flush();
bScanRequired = true;
}
if (!pm.HasType(VSTPLUGINTYPE)) {
// rescan.
pm.Close();
VSTEffect::Scan();
if( bScanRequired)
VSTEffect::Scan();
pm.Open();
}
EffectManager & em = EffectManager::Get();
wxString path = pm.GetFirstPlugin(VSTPLUGINTYPE);