mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-07 06:05:43 +01:00
prevent double-listing of LADSPA plugins caused by symlinks to library directories (e.g. lib64 -> lib)
git-svn-id: svn://localhost/ardour2/branches/3.0@4722 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
97f022575c
commit
cb8ced74b5
1 changed files with 18 additions and 1 deletions
|
|
@ -313,6 +313,7 @@ PluginManager::ladspa_discover (string path)
|
|||
const LADSPA_Descriptor *descriptor;
|
||||
LADSPA_Descriptor_Function dfunc;
|
||||
const char *errstr;
|
||||
bool first = true;
|
||||
|
||||
if ((module = dlopen (path.c_str(), RTLD_NOW)) == 0) {
|
||||
error << string_compose(_("LADSPA: cannot load module \"%1\" (%2)"), path, dlerror()) << endmsg;
|
||||
|
|
@ -364,7 +365,23 @@ PluginManager::ladspa_discover (string path)
|
|||
}
|
||||
}
|
||||
|
||||
_ladspa_plugin_info.push_back (info);
|
||||
if(_ladspa_plugin_info.empty()){
|
||||
_ladspa_plugin_info.push_back (info);
|
||||
}
|
||||
|
||||
//Ensure that the plugin is not already in the plugin list.
|
||||
|
||||
bool found = false;
|
||||
|
||||
for (PluginInfoList::const_iterator i = _ladspa_plugin_info.begin(); i != _ladspa_plugin_info.end(); ++i) {
|
||||
if(0 == info->unique_id.compare((*i)->unique_id)){
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!found){
|
||||
_ladspa_plugin_info.push_back (info);
|
||||
}
|
||||
}
|
||||
|
||||
// GDB WILL NOT LIKE YOU IF YOU DO THIS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue