[tracker/direct-access] libtracker-data: in READONLY we never do ontology-change coping
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/direct-access] libtracker-data: in READONLY we never do ontology-change coping
- Date: Thu, 8 Jul 2010 10:21:26 +0000 (UTC)
commit 6b6d0433ba6b6fdd8977b51a69b70788052f0008
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Jul 8 12:19:33 2010 +0200
libtracker-data: in READONLY we never do ontology-change coping
src/libtracker-data/tracker-data-manager.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index c82d1be..9318f61 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -2259,9 +2259,12 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
GList *sorted = NULL, *l;
const gchar *env_path;
gint max_id = 0;
+ gboolean read_only;
tracker_data_update_init ();
+ read_only = flags & TRACKER_DB_MANAGER_READONLY;
+
/* First set defaults for return values */
if (first_time) {
*first_time = FALSE;
@@ -2348,7 +2351,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
g_hash_table_unref (properties);
g_hash_table_unref (id_uri_map);
- } else if (is_first_time_index) {
+ } else if (is_first_time_index && !read_only) {
sorted = get_ontologies (test_schemas != NULL, ontologies_dir);
/* Truncate journal as it does not even contain a single valid transaction
@@ -2423,7 +2426,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
tracker_db_interface_sqlite_fts_init (iface, FALSE);
}
- if (check_ontology) {
+ if (check_ontology && !read_only) {
GList *to_reload = NULL;
GList *ontos = NULL;
guint p;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]