summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-06-04 00:47:48 +0000
committerDavid Robillard <d@drobilla.net>2009-06-04 00:47:48 +0000
commit5e6d421dac80359477a926456a56a7772bfc0945 (patch)
tree43b625d446c1fee4f1befb7847cc8091ac053c38 /src/client
parenta90bca852a42e2b89ccdb998ec38197f1afb8649 (diff)
downloadingen-5e6d421dac80359477a926456a56a7772bfc0945.tar.gz
ingen-5e6d421dac80359477a926456a56a7772bfc0945.tar.bz2
ingen-5e6d421dac80359477a926456a56a7772bfc0945.zip
Don't treat non-plugin metadata as plugin data.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2092 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client')
-rw-r--r--src/client/ClientStore.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 4943cf71..97d130da 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -274,12 +274,20 @@ ClientStore::put(const URI& uri, const Resource::Properties& properties)
cerr << "}" << endl;*/
bool is_path = Path::is_valid(uri.str());
- bool is_meta = uri.substr(0, 8) == "meta:#";
+ bool is_meta = uri.substr(0, 6) == "meta:#";
if (!(is_path || is_meta)) {
const URI& type_uri = properties.find("rdf:type")->second.get_uri();
- SharedPtr<PluginModel> p(new PluginModel(uri, type_uri, properties));
- add_plugin(p);
+ if (Plugin::type_from_uri(type_uri.str()) != Plugin::NIL) {
+ SharedPtr<PluginModel> p(new PluginModel(uri, type_uri, properties));
+ add_plugin(p);
+ return;
+ }
+ }
+
+ string path_str = is_meta ? (string("/") + uri.chop_start("#")) : uri.str();
+ if (!Path::is_valid(path_str)) {
+ cerr << "ERROR: Bad path: " << uri.str() << " - " << path_str << endl;
return;
}