[tracker/journal: 17/22] libtracker-data: Fix constraint error warnings during journal replay



commit c55b6b50ac4f14b0ebd4b8916edc0c5be562a58e
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue Mar 16 15:28:04 2010 +0100

    libtracker-data: Fix constraint error warnings during journal replay

 src/libtracker-data/tracker-data-update.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 3c448b2..27cfae7 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -2423,9 +2423,18 @@ tracker_data_replay_journal (GHashTable *classes,
 			TrackerDBStatement *stmt;
 			gint id;
 			const gchar *uri;
+			TrackerProperty *property = NULL;
+			TrackerClass *class;
 
 			tracker_db_journal_reader_get_resource (&id, &uri);
 
+			class = g_hash_table_lookup (classes, GINT_TO_POINTER (id));
+			if (!class)
+				property = g_hash_table_lookup (properties, GINT_TO_POINTER (id));
+
+			if (property || class)
+				continue;
+
 			iface = tracker_db_manager_get_db_interface ();
 
 			stmt = tracker_db_interface_create_statement (iface,



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