summaryrefslogtreecommitdiff
path: root/libs/ardour/panner_manager.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-11-15 01:25:40 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-11-15 01:25:40 +0000
commitc56e8c2b209840c12ea7456a97d893952b2007d7 (patch)
treea864ac450eb621529bc75ac978a7152d73f68413 /libs/ardour/panner_manager.cc
parenta8615b40a1add070be209bc923c352073945bfa5 (diff)
don't look for panners in symlinks to avoid finding "duplicate" libs
git-svn-id: svn://localhost/ardour2/branches/3.0@10606 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/panner_manager.cc')
-rw-r--r--libs/ardour/panner_manager.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/libs/ardour/panner_manager.cc b/libs/ardour/panner_manager.cc
index 30b93c3c37..9c086749cf 100644
--- a/libs/ardour/panner_manager.cc
+++ b/libs/ardour/panner_manager.cc
@@ -1,8 +1,30 @@
+/*
+ Copyright (C) 2011 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <unistd.h>
+
#include <glibmm/pattern.h>
#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"
@@ -61,6 +83,14 @@ PannerManager::panner_discover (string path)
{
PannerInfo* pinfo;
+ /* don't look in symlinks, because otherwise we find too many versions
+ * of the same library.
+ */
+
+ if (PBD::is_symlink (path)) {
+ return 0;
+ }
+
if ((pinfo = get_descriptor (path)) != 0) {
panner_info.push_back (pinfo);
info << string_compose(_("Panner discovered: \"%1\" in %2"), pinfo->descriptor.name, path) << endmsg;