summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2014-12-23 15:54:54 +0000
committerSam Thursfield <sam@afuera.me.uk>2014-12-26 23:23:05 +0000
commit6537c3c39091e047675bcb89ddfc87d02c378f38 (patch)
tree0b77022d216febf89bdef7d943863428517b7f8d
parent133b34bb52e9109bc4f392b50bd0a9d55b283b31 (diff)
downloadtracker-6537c3c39091e047675bcb89ddfc87d02c378f38.tar.gz
miner-fs: Only process 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. I think the TrackerMinerFS should only be processing resources that have type nfo:FileDataObject, not all resources with URL
-rw-r--r--src/libtracker-miner/tracker-file-notifier.c2
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 b82b43a86..d0d418e1b 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -775,7 +775,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)