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

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

This commit is contained in:
Leland Lucius
2020-06-15 00:51:27 -05:00
parent 4334a656b0
commit f3d3211558
2 changed files with 34 additions and 9 deletions

View File

@@ -260,6 +260,7 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler)
FileNames::FindFilesInPathList(wxT("*.so"), pathList, files);
#endif
FilePaths checked;
wxString saveOldCWD = ::wxGetCwd();
for (i = 0; i < files.size(); i++) {
// As a courtesy to some modules that might be bridges to
@@ -268,6 +269,13 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler)
auto prefix = ::wxPathOnly(files[i]);
::wxSetWorkingDirectory(prefix);
// Only process the first module encountered in the
// defined search sequence.
wxString ShortName = wxFileName( files[i] ).GetName();
if( checked.Index( ShortName, false ) != wxNOT_FOUND )
continue;
checked.Add( ShortName );
#ifdef EXPERIMENTAL_MODULE_PREFS
int iModuleStatus = ModulePrefs::GetModuleStatus( files[i] );
if( iModuleStatus == kModuleDisabled )
@@ -288,7 +296,6 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler)
// I think it would be better to show the module prefs page,
// and let the user decide for each one.
{
wxString ShortName = wxFileName( files[i] ).GetName();
auto msg = XO("Module \"%s\" found.").Format( ShortName );
msg += XO("\n\nOnly use modules from trusted sources");
const TranslatableStrings buttons{