diff options
author | David Robillard <d@drobilla.net> | 2011-06-11 18:41:11 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-06-11 18:41:11 +0000 |
commit | 61703bf730a967e2a289860d211d9dc581d08036 (patch) | |
tree | 4c87752cb3df5a8de59bec0ac39e197792354a65 | |
parent | d57cae4e43dd718ad416748032f1944c313696ff (diff) | |
download | lilv-61703bf730a967e2a289860d211d9dc581d08036.tar.gz lilv-61703bf730a967e2a289860d211d9dc581d08036.tar.bz2 lilv-61703bf730a967e2a289860d211d9dc581d08036.zip |
Parse data files with their own URIs as base URIs and allow plugin data files not within the plugin's main bundle. Fixes ticket #702.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3386 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/plugin.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/plugin.c b/src/plugin.c index cfb3398..8b86e04 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -123,17 +123,11 @@ lilv_plugin_load(LilvPlugin* p) // Parse all the plugin's data files into RDF model LILV_FOREACH(nodes, i, p->data_uris) { - const LilvNode* data_uri_val = lilv_nodes_get(p->data_uris, i); - const char* data_uri_str = lilv_node_as_uri(data_uri_val); - if (strncmp((const char*)data_uri_str, - (const char*)bundle_uri_snode->buf, - bundle_uri_snode->n_bytes)) { - LILV_WARNF("Ignored data file <%s> not in bundle <%s>\n", - (const char*)data_uri_str, - (const char*)bundle_uri_snode->buf); - continue; - } + const LilvNode* data_uri_val = lilv_nodes_get(p->data_uris, i); + const SordNode* data_uri_node = data_uri_val->val.uri_val; + const char* data_uri_str = lilv_node_as_uri(data_uri_val); + serd_env_set_base_uri(env, sord_node_to_serd_node(data_uri_node)); serd_reader_add_blank_prefix(reader, lilv_world_blank_node_prefix(p->world)); serd_reader_read_file(reader, (const uint8_t*)data_uri_str); |