summaryrefslogtreecommitdiff
path: root/libs/ardour/lv2_plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r--libs/ardour/lv2_plugin.cc23
1 files changed, 10 insertions, 13 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index 8fac9369b0..6ae99302da 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -32,7 +32,7 @@
#include <boost/utility.hpp>
#include "pbd/clear_dir.h"
-#include "pbd/pathscanner.h"
+#include "pbd/file_utils.h"
#include "pbd/stl_delete.h"
#include "pbd/compose.h"
#include "pbd/error.h"
@@ -2014,22 +2014,19 @@ LV2World::load_bundled_plugins()
{
if (!_bundle_checked) {
cout << "Scanning folders for bundled LV2s: " << ARDOUR::lv2_bundled_search_path().to_string() << endl;
- PathScanner scanner;
- vector<string *> *plugin_objects = scanner (ARDOUR::lv2_bundled_search_path().to_string(), lv2_filter, 0, true, true);
- if (plugin_objects) {
- for ( vector<string *>::iterator x = plugin_objects->begin(); x != plugin_objects->end (); ++x) {
+
+ vector<string> plugin_objects;
+ find_files_matching_filter (plugin_objects, ARDOUR::lv2_bundled_search_path().to_string(), lv2_filter, 0, true, true);
+ for ( vector<string>::iterator x = plugin_objects.begin(); x != plugin_objects.end (); ++x) {
#ifdef PLATFORM_WINDOWS
- string uri = "file:///" + **x + "/";
+ string uri = "file:///" + *x + "/";
#else
- string uri = "file://" + **x + "/";
+ string uri = "file://" + *x + "/";
#endif
- LilvNode *node = lilv_new_uri(world, uri.c_str());
- lilv_world_load_bundle(world, node);
- lilv_node_free(node);
- }
+ LilvNode *node = lilv_new_uri(world, uri.c_str());
+ lilv_world_load_bundle(world, node);
+ lilv_node_free(node);
}
- vector_delete (plugin_objects);
- delete (plugin_objects);
_bundle_checked = true;
}