diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-12-05 11:58:52 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2022-12-24 01:14:41 +0100 |
commit | cb97996cb2e2851c0335d402a02c2aba375472ab (patch) | |
tree | 8839a9a783000451013133138eff3649daa3748e | |
parent | d2e38bcb7ebbff8ae7e15d8d211982750c67604c (diff) | |
download | tracker-cb97996cb2e2851c0335d402a02c2aba375472ab.tar.gz |
core: Remove "_:" prefix from all blank node labels in the map
Right now, the SPARQL parsing bits add these blank node labels with
the _: prefix stripped, while the update paths from TrackerResource
do not. Make it sure that the strings in this map are consistent,
so blank node labels can be referenced from multiple elements in a
TrackerBatch, as it was intended.
-rw-r--r-- | src/libtracker-sparql/core/tracker-data-update.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libtracker-sparql/core/tracker-data-update.c b/src/libtracker-sparql/core/tracker-data-update.c index 7c9dec11e..8f5ba7106 100644 --- a/src/libtracker-sparql/core/tracker-data-update.c +++ b/src/libtracker-sparql/core/tracker-data-update.c @@ -1943,6 +1943,10 @@ get_bnode_id (GHashTable *bnodes, { TrackerRowid *value, bnode_id; + /* Skip blank node label prefixes */ + if (g_str_has_prefix (str, "_:")) + str = &str[2]; + value = g_hash_table_lookup (bnodes, str); if (value) return *value; |