From 71f69453ede12c54dfaa579d989735981573594d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 16 Nov 2011 00:14:06 +0000 Subject: avoid duplicate panners by checking names, not symlinks git-svn-id: svn://localhost/ardour2/branches/3.0@10636 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/panner_manager.cc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'libs/ardour/panner_manager.cc') diff --git a/libs/ardour/panner_manager.cc b/libs/ardour/panner_manager.cc index 7203f57cba..6230b6b429 100644 --- a/libs/ardour/panner_manager.cc +++ b/libs/ardour/panner_manager.cc @@ -20,11 +20,11 @@ #include #include +#include #include "pbd/error.h" #include "pbd/compose.h" #include "pbd/file_utils.h" -#include "pbd/symlink.h" #include "ardour/panner_manager.h" #include "ardour/panner_search_path.h" @@ -87,17 +87,20 @@ PannerManager::panner_discover (string path) { PannerInfo* pinfo; - /* don't look in symlinks, because otherwise we find too many versions - * of the same library. - */ + if ((pinfo = get_descriptor (path)) != 0) { - if (PBD::is_symlink (path)) { - return 0; - } + list::iterator i; - if ((pinfo = get_descriptor (path)) != 0) { - panner_info.push_back (pinfo); - info << string_compose(_("Panner discovered: \"%1\" in %2"), pinfo->descriptor.name, path) << endmsg; + for (i = panner_info.begin(); i != panner_info.end(); ++i) { + if (pinfo->descriptor.name == (*i)->descriptor.name) { + break; + } + } + + if (i == panner_info.end()) { + panner_info.push_back (pinfo); + info << string_compose(_("Panner discovered: \"%1\" in %2"), pinfo->descriptor.name, path) << endmsg; + } } return 0; -- cgit v1.2.3