From a60da2bc0f7fbaa8a6722d8ac40c2b79841777a1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 10 Mar 2012 03:19:42 +0000 Subject: Fix loading as an LV2 plugin. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4040 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/ingen_lv2.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index e7a07e5a..ac84c268 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -416,19 +416,23 @@ Lib::Lib() typedef Serialisation::Parser::PatchRecords Records; const std::string manifest_path = Shared::bundle_file_path("manifest.ttl"); + const std::string manifest_uri = Glib::filename_to_uri(manifest_path); const SerdNode base_node = serd_node_from_string( - SERD_URI, (const uint8_t*)manifest_path.c_str()); + SERD_URI, (const uint8_t*)manifest_uri.c_str()); SerdEnv* env = serd_env_new(&base_node); Records records( - world->parser()->find_patches(world, env, - Glib::filename_to_uri(manifest_path))); + world->parser()->find_patches(world, env, manifest_uri)); serd_env_free(env); for (Records::iterator i = records.begin(); i != records.end(); ++i) { - patches.push_back( - SharedPtr(new LV2Patch(i->patch_uri.str(), - i->file_uri))); + uint8_t* path = serd_file_uri_parse((const uint8_t*)i->file_uri.c_str(), NULL); + if (path) { + patches.push_back( + SharedPtr( + new LV2Patch(i->patch_uri.str(), (const char*)path))); + } + free(path); } delete world; -- cgit v1.2.1