summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-10 03:19:42 +0000
committerDavid Robillard <d@drobilla.net>2012-03-10 03:19:42 +0000
commita60da2bc0f7fbaa8a6722d8ac40c2b79841777a1 (patch)
tree1a77702cb1e44f6a39d5029d6cd31a04c118972e /src
parent639df9671f14b8dd4a615ef083f20fa4a1c88b8b (diff)
downloadingen-a60da2bc0f7fbaa8a6722d8ac40c2b79841777a1.tar.gz
ingen-a60da2bc0f7fbaa8a6722d8ac40c2b79841777a1.tar.bz2
ingen-a60da2bc0f7fbaa8a6722d8ac40c2b79841777a1.zip
Fix loading as an LV2 plugin.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4040 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/server/ingen_lv2.cpp16
1 files changed, 10 insertions, 6 deletions
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<const LV2Patch>(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<const LV2Patch>(
+ new LV2Patch(i->patch_uri.str(), (const char*)path)));
+ }
+ free(path);
}
delete world;