summaryrefslogtreecommitdiffstats
path: root/src/serialisation
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialisation')
-rw-r--r--src/serialisation/Serialiser.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp
index 37d80e0d..1eb76344 100644
--- a/src/serialisation/Serialiser.cpp
+++ b/src/serialisation/Serialiser.cpp
@@ -266,7 +266,7 @@ Sord::Node
Serialiser::path_rdf_node(const Path& path)
{
assert(_model);
- assert(path.is_child_of(_root_path));
+ assert(path == _root_path || path.is_child_of(_root_path));
const Path rel_path(path.relative_to_base(_root_path));
return Sord::URI(_model->world(), rel_path.chop_scheme().substr(1));
}
@@ -323,8 +323,7 @@ Serialiser::serialise_patch(SharedPtr<Patch> patch, const Sord::Node& patch_id)
if (s == patch->properties().end()
|| !s->second.type() == Atom::STRING
|| !Symbol::is_valid(s->second.get_string())) {
- const string path = Glib::filename_from_uri(_model->base_uri().to_c_string());
- symbol = Glib::path_get_basename(path);
+ symbol = Glib::path_get_basename(_model->base_uri().to_c_string());
symbol = Symbol::symbolify(symbol.substr(0, symbol.find('.')));
_model->add_statement(
patch_id,