[tracker/wip/carlosg/sparql1.1: 48/80] libtracker-data: Fix token check
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/sparql1.1: 48/80] libtracker-data: Fix token check
- Date: Sun, 7 Jul 2019 23:53:45 +0000 (UTC)
commit c135f55d60d2fb717a00d7c6860b0320e43901d5
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jun 15 18:06:17 2019 +0200
libtracker-data: Fix token check
We only allow literal objects in the direct rdf:type checks, most
notably, we don't allow parameters. So just request a literal
explicitly there.
src/libtracker-data/tracker-sparql.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-data/tracker-sparql.c b/src/libtracker-data/tracker-sparql.c
index ef128a147..f27087034 100644
--- a/src/libtracker-data/tracker-sparql.c
+++ b/src/libtracker-data/tracker-sparql.c
@@ -1102,7 +1102,7 @@ _add_quad (TrackerSparql *sparql,
property = tracker_ontologies_get_property_by_uri (ontologies,
tracker_token_get_literal (predicate));
- if (!tracker_token_get_variable (object) &&
+ if (tracker_token_get_literal (object) &&
g_strcmp0 (tracker_token_get_literal (predicate), RDF_NS "type") == 0) {
/* rdf:type query */
subject_type = tracker_ontologies_get_class_by_uri (ontologies,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]