tracker r1713 - in branches/indexer-split: . src/libtracker-db
- From: carlosg svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1713 - in branches/indexer-split: . src/libtracker-db
- Date: Thu, 19 Jun 2008 11:12:01 +0000 (UTC)
Author: carlosg
Date: Thu Jun 19 11:12:01 2008
New Revision: 1713
URL: http://svn.gnome.org/viewvc/tracker?rev=1713&view=rev
Log:
2008-06-19 Carlos Garnacho <carlos imendio com>
* src/libtracker-db/tracker-db-manager.c (set_up_databases): Create
databases on DB manager initialization.
(tracker_db_manager_init): Ensure the tmp dir is created.
(tracker_db_manager_shutdown): And removed here.
(tracker_db_manager_get_db_interface): No need to create the database
lazily here.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/libtracker-db/tracker-db-manager.c
Modified: branches/indexer-split/src/libtracker-db/tracker-db-manager.c
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-manager.c (original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-manager.c Thu Jun 19 11:12:01 2008
@@ -165,6 +165,7 @@
/* Fill absolute path for the database */
dir = location_to_directory (dbs[i].location);
dbs[i].abs_filename = g_build_filename (dir, dbs[i].file, NULL);
+ db_interface_create (i, attach_all);
}
g_message ("Setting up all databases completed");
@@ -2178,6 +2179,10 @@
db_user_data_dir = g_strdup (user_data_dir);
db_sys_tmp_dir = g_strdup (sys_tmp_dir);
+ /* create directory in tmp */
+ g_message ("Creating directory:'%s'", db_sys_tmp_dir);
+ g_mkdir_with_parents (db_sys_tmp_dir, 00755);
+
/* Add prepared queries */
prepared_queries = g_hash_table_new_full (g_str_hash,
g_str_equal,
@@ -2186,10 +2191,10 @@
load_prepared_queries ();
+ initialized = TRUE;
+
/* Configure database locations and interfaces */
set_up_databases ();
-
- initialized = TRUE;
}
void
@@ -2216,6 +2221,10 @@
g_hash_table_unref (prepared_queries);
prepared_queries = NULL;
+ /* Remove directory in tmp */
+ g_message ("Removing directory:'%s'", db_sys_tmp_dir);
+ tracker_path_remove (db_sys_tmp_dir);
+
g_free (db_data_dir);
g_free (db_user_data_dir);
g_free (db_sys_tmp_dir);
@@ -2343,10 +2352,6 @@
{
g_return_val_if_fail (initialized != FALSE, NULL);
- if (!dbs[db].iface) {
- dbs[db].iface = db_interface_create (db, attach_all);
- }
-
return dbs[db].iface;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]