summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-06-09 00:11:53 +0000
committerDavid Robillard <d@drobilla.net>2013-06-09 00:11:53 +0000
commitd8786445f29d49ff3b43d942c2f98f937416a837 (patch)
tree548dbe0a1a62d3c2f256fca0909bf3b244da2682
parent50b785cfbe4ef9fcfd7b95d6948e457d62cfecf3 (diff)
downloadingen-d8786445f29d49ff3b43d942c2f98f937416a837.tar.gz
ingen-d8786445f29d49ff3b43d942c2f98f937416a837.tar.bz2
ingen-d8786445f29d49ff3b43d942c2f98f937416a837.zip
Fix saving of bad node URIs in state.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5131 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/serialisation/Serialiser.cpp8
-rw-r--r--src/server/ingen_lv2.cpp2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp
index 45d95050..a6c181f9 100644
--- a/src/serialisation/Serialiser.cpp
+++ b/src/serialisation/Serialiser.cpp
@@ -528,9 +528,11 @@ Serialiser::Impl::serialise_arc(const Sord::Node& parent,
}
static bool
-skip_property(const Sord::Node& predicate)
+skip_property(Ingen::URIs& uris, const Sord::Node& predicate)
{
- return (predicate.to_string() == "http://drobilla.net/ns/ingen#document");
+ return (predicate.to_string() == "http://drobilla.net/ns/ingen#document" ||
+ predicate.to_string() == uris.ingen_block ||
+ predicate.to_string() == uris.lv2_port);
}
void
@@ -552,7 +554,7 @@ Serialiser::Impl::serialise_properties(Sord::Node id,
typedef Node::Properties::const_iterator iterator;
for (const auto& p : props) {
const Sord::URI key(_model->world(), p.first);
- if (!skip_property(key)) {
+ if (!skip_property(_world.uris(), key)) {
sratom_write(_sratom, unmap, 0,
sord_node_to_serd_node(id.c_obj()),
sord_node_to_serd_node(key.c_obj()),
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index c8c0b922..22d86c9c 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -751,7 +751,7 @@ ingen_restore(LV2_Handle instance,
&size, &type, &valflags);
if (!path) {
- plugin->world->log().error("Failed to restore ingen:file\n");
+ plugin->world->log().warn("Failed to restore ingen:file\n");
return LV2_STATE_ERR_NO_PROPERTY;
}