[tracker] libtracker-data: Handle unsupported tracker:fulltextIndexed ontology changes



commit f2a21bab88f6318a92c0ed869b415e97c901a498
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Oct 14 16:41:46 2010 +0200

    libtracker-data: Handle unsupported tracker:fulltextIndexed ontology changes

 src/libtracker-data/tracker-data-manager.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 5a0e6c9..7c1e92e 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -953,6 +953,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
 		}
 	} else if (g_strcmp0 (predicate, TRACKER_PREFIX "fulltextIndexed") == 0) {
 		TrackerProperty *property;
+		gboolean is_new;
 
 		property = tracker_ontologies_get_property_by_uri (subject);
 		if (property == NULL) {
@@ -960,7 +961,22 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
 			return;
 		}
 
-		if (tracker_property_get_is_new (property) != in_update) {
+		is_new = tracker_property_get_is_new (property);
+		if (is_new != in_update) {
+			/* Detect unsupported ontology change (this needs a journal replay) */
+			if (in_update == TRUE && is_new == FALSE) {
+				if (check_unsupported_property_value_change (ontology_path,
+				                                             "tracker:fulltextIndexed",
+				                                             subject,
+				                                             predicate,
+				                                             object)) {
+					handle_unsupported_ontology_change (ontology_path,
+					                                    tracker_property_get_name (property),
+					                                    "tracker:fulltextIndexed",
+					                                    tracker_property_get_fulltext_indexed (property) ? "true" : "false",
+					                                    g_strcmp0 (object, "true") == 0 ? "true" : "false");
+				}
+			}
 			return;
 		}
 



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