[tracker] tracker-writeback: Add nfo:FileDataObject to tracker-writeback query



commit 61ee6faf9e4bfc5f19fc0fb32d2f3d8c8a5c1802
Author: Philip Van Hoof <philip codeminded be>
Date:   Fri Jan 28 11:26:54 2011 +0100

    tracker-writeback: Add nfo:FileDataObject to tracker-writeback query
    
    This blocks tracker-writeback from trying to writeback to so-called
    virtual files (resources that are being filled in for a file that
    will arrive as a file in nearby future).
    
    It does this by requiring nfo:FileDataObject: so-called virtual files
    must not be made nfo:FileDataObject but only nfo:DataObject, as it'll
    be tracker-miner-fs picking up and filling in the nfo:FileDataObject
    parts. As soon as this has happened, tracker-writeback is permitted
    to start becoming responsible for writing metadata back into the file.
    
    Fixes NB#222494.
    
    However, this bug illustrates other problems that must be fixed too.

 src/tracker-writeback/tracker-writeback-consumer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-writeback/tracker-writeback-consumer.c b/src/tracker-writeback/tracker-writeback-consumer.c
index d3d75ac..26ad87a 100644
--- a/src/tracker-writeback/tracker-writeback-consumer.c
+++ b/src/tracker-writeback/tracker-writeback-consumer.c
@@ -305,11 +305,12 @@ rdf_types_to_uris_cb (GObject      *object,
 		}
 
 		query = g_strdup_printf ("SELECT ?url '%s' ?predicate ?object { "
+		                            "<%s> a nfo:FileDataObject . "
 		                            "<%s> ?predicate ?object ; nie:url ?url . "
 		                            "?predicate tracker:writeback true . "
 		                            "FILTER (NOT EXISTS { GRAPH <"TRACKER_MINER_FS_GRAPH_URN"> "
 		                              "{ <%s> ?predicate ?object } }) } ",
-		                         subject, subject, subject);
+		                         subject, subject, subject, subject);
 
 		tracker_sparql_connection_query_async (priv->connection,
 		                                       query,



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