[tracker] libtracker-miner: Don't delete nie:contentCreated when updating files



commit 1ebc9468be146e7a29b208b7391a52fa58add670
Author: Martyn Russell <martyn lanedo com>
Date:   Thu Mar 10 16:53:31 2011 +0000

    libtracker-miner: Don't delete nie:contentCreated when updating files
    
    Fixes NB#232574, nie::ContentCreated is updated when the mtime of a file changes

 src/libtracker-miner/tracker-miner-fs.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 285549a..33453df 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1669,8 +1669,18 @@ item_add_or_update_cb (TrackerMinerFS        *fs,
 
 				/* update, delete all statements inserted by miner
 				 * except for rdf:type statements as they could cause implicit deletion of user data */
-				full_sparql = g_strdup_printf ("DELETE { GRAPH <%s> { <%s> ?p ?o } } "
-				                               "WHERE { GRAPH <%s> { <%s> ?p ?o FILTER (?p != rdf:type) } } %s",
+				full_sparql = g_strdup_printf ("DELETE {"
+				                               "  GRAPH <%s> {"
+				                               "    <%s> ?p ?o"
+				                               "  } "
+				                               "} "
+				                               "WHERE {"
+				                               "  GRAPH <%s> {"
+				                               "    <%s> ?p ?o"
+				                               "    FILTER (?p != rdf:type && ?p != nie:contentCreated)"
+				                               "  } "
+				                               "} "
+				                               "%s",
 				                               TRACKER_MINER_FS_GRAPH_URN,
 				                               ctxt->urn,
 				                               TRACKER_MINER_FS_GRAPH_URN,



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