[tracker] libtracker-data: Detect corruption before integrity_check at set of WAL
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Detect corruption before integrity_check at set of WAL
- Date: Thu, 10 Feb 2011 09:13:07 +0000 (UTC)
commit 4c3e8c1b2492900bee67057a5b8ca3413e64961a
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Feb 10 10:06:00 2011 +0100
libtracker-data: Detect corruption before integrity_check at set of WAL
src/libtracker-data/tracker-db-manager.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index 5f48d0e..d29083b 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -1046,15 +1046,11 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
dbs[i].iface = db_interface_create (i, &internal_error);
if (internal_error) {
- guint y;
-
- for (y = 1; y < i; y++) {
- g_object_unref (dbs[y].iface);
- dbs[y].iface = NULL;
- }
-
- g_propagate_error (error, internal_error);
- return FALSE;
+ /* If this already doesn't succeed, then surely the file is
+ * corrupt. No need to check for integrity anymore. */
+ g_error_free (internal_error);
+ must_recreate = TRUE;
+ continue;
}
dbs[i].mtime = tracker_file_get_mtime (dbs[i].abs_filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]