[tracker/wip/carlosg/sparql1.1: 87/145] libtracker-data: Fix token check



commit 91aacc5aec4a08a0f34da1affe7bdb3f9bef2caa
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 ad3dc3455..2a9950007 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]