cosmetic change - properly use lilv API
authorRobin Gareus <robin@gareus.org>
Sun, 12 Jan 2014 16:14:14 +0000 (17:14 +0100)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 13 Jan 2014 14:38:24 +0000 (09:38 -0500)
libs/ardour/lv2_plugin.cc

index e6b3c2d56ec49f51b86844089b7ef8bc059c5571..f24aa653bb1fc2b3b4b7e6cc2158cc659bd6d7b2 100644 (file)
@@ -1095,10 +1095,12 @@ LV2Plugin::do_save_preset(string name)
        lilv_state_free(state);
 
        std::string uri = Glib::filename_to_uri(Glib::build_filename(bundle, file_name));
-       LilvNode *node = lilv_new_uri(_world.world, uri.c_str());
-       lilv_world_load_bundle(_world.world, node);
-       lilv_world_load_resource(_world.world, node);
-       lilv_node_free(node);
+       LilvNode *node_bundle = lilv_new_uri(_world.world, Glib::filename_to_uri(Glib::build_filename(bundle, "/")).c_str());
+       LilvNode *node_preset = lilv_new_uri(_world.world, uri.c_str());
+       lilv_world_load_bundle(_world.world, node_bundle);
+       lilv_world_load_resource(_world.world, node_preset);
+       lilv_node_free(node_bundle);
+       lilv_node_free(node_preset);
        return uri;
 }