[tracker/sam/miner-fs-ignore-non-files: 1/2] miner-fs: Only process nfo:FileDataObject resources
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/miner-fs-ignore-non-files: 1/2] miner-fs: Only process nfo:FileDataObject resources
- Date: Tue, 30 Dec 2014 21:23:15 +0000 (UTC)
commit 6537c3c39091e047675bcb89ddfc87d02c378f38
Author: Sam Thursfield <sam afuera me uk>
Date: Tue Dec 23 15:54:54 2014 +0000
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
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 b82b43a..d0d418e 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]