[tracker/tracker-0.10] libtracker-miner: Fix mtime check
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] libtracker-miner: Fix mtime check
- Date: Thu, 14 Apr 2011 15:16:21 +0000 (UTC)
commit d04673577195a61aed25490ec0b5f256bf9b6050
Author: Jürg Billeter <j bitron ch>
Date: Mon Apr 11 17:08:04 2011 +0200
libtracker-miner: Fix mtime check
Due to a bug in the query used for mtime checking, all files were
considered updated and hence reextracted.
Fixes NB#241302.
src/libtracker-miner/tracker-miner-fs.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 71b393e..9fbab10 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2965,11 +2965,12 @@ ensure_mtime_cache (TrackerMinerFS *fs,
g_debug ("Generating mtime cache for URI '%s'", uri);
- query = g_strdup_printf ("SELECT ?url IF(tracker:damaged(?u), '0001-01-01T00:00:00Z', ?last) { "
+ query = g_strdup_printf ("SELECT ?url IF(bound(?damaged) && ?damaged, '0001-01-01T00:00:00Z', STR(?last)) { "
"?u nfo:belongsToContainer ?p ; "
" nie:url ?url ; "
" nfo:fileLastModified ?last . "
- "?p nie:url \"%s\" }", uri);
+ "?p nie:url \"%s\" . "
+ "OPTIONAL { ?u tracker:damaged ?damaged }}", uri);
g_free (uri);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]