[tracker/sam/diagrams: 3/9] TrackerFileNotifier should only care about nfo:FileDataObject resources



commit a105019cdd102dba332477293bf4a0df96605edf
Author: Sam Thursfield <sam afuera me uk>
Date:   Tue Dec 23 15:54:54 2014 +0000

    TrackerFileNotifier should only care about nfo:FileDataObject resources
    
    The motivation for this commit is that the 600-applications-camera.py
    functional-test would trigger the following warning:
    
       (tracker-miner-fs:28346): Tracker-CRITICAL **: tracker_string_to_date: assertion 'date_string' failed
    
    The cause was in tracker-file-notifier.c:sparql_files_query_cb(), which
    processes a query that expects every resource with an nie:url property
    to also have nfo:fileLastModified property.
    
    Not all resources correspond to files. The TrackerMinerFS should only be
    processing resources that have type nfo:FileDataObject.

 src/libtracker-miner/tracker-file-notifier.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 1cddc56..19594c0 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -770,7 +770,7 @@ sparql_files_compose_query (GFile **files,
        gint i = 0;
 
        str = g_string_new ("SELECT ?url ?u nfo:fileLastModified(?u) {"
-                           "  ?u a rdfs:Resource ; nie:url ?url . "
+                           "  ?u a nfo:FileDataObject ; nie:url ?url . "
                            "FILTER (?url IN (");
        for (i = 0; i < n_files; i++) {
                if (i != 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]