[tracker] libtracker-db: Updated first index filename and set contents
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-db: Updated first index filename and set contents
- Date: Wed, 9 Jun 2010 17:51:50 +0000 (UTC)
commit 01a7df4086cf8f4fced231d58e385b467dce2be2
Author: Martyn Russell <martyn lanedo com>
Date: Wed Jun 9 18:09:30 2010 +0100
libtracker-db: Updated first index filename and set contents
Use first-index.txt not .firstindex
Set content to version that did first index
src/libtracker-db/tracker-db-manager.c | 10 +++++-----
src/miners/fs/tracker-miner-files.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-manager.c b/src/libtracker-db/tracker-db-manager.c
index 7709657..28cb787 100644
--- a/src/libtracker-db/tracker-db-manager.c
+++ b/src/libtracker-db/tracker-db-manager.c
@@ -59,7 +59,7 @@
#define IN_USE_FILENAME ".meta.isrunning"
/* Stamp filename to check for first index */
-#define FIRST_INDEX_STAMP_FILENAME ".firstindex"
+#define FIRST_INDEX_FILENAME "first-index.txt"
typedef enum {
TRACKER_DB_LOCATION_DATA_DIR,
@@ -1289,12 +1289,12 @@ tracker_db_manager_has_enough_space (void)
}
-static gchar *
+inline static gchar *
get_first_index_stamp_path (void)
{
return g_build_filename (g_get_user_cache_dir (),
"tracker",
- FIRST_INDEX_STAMP_FILENAME,
+ FIRST_INDEX_FILENAME,
NULL);
}
@@ -1311,7 +1311,7 @@ tracker_db_manager_get_first_index_done (void)
gboolean exists;
gchar *stamp;
- stamp = get_first_index_stamp_path();
+ stamp = get_first_index_stamp_path ();
exists = g_file_test (stamp, G_FILE_TEST_EXISTS);
g_free (stamp);
@@ -1339,7 +1339,7 @@ tracker_db_manager_set_first_index_done (gboolean done)
GError *error = NULL;
/* If done, create stamp file if not already there */
- if (!g_file_set_contents (stamp, "", -1, &error)) {
+ if (!g_file_set_contents (stamp, PACKAGE_VERSION, -1, &error)) {
g_warning (" Creating first-index stamp in "
"'%s' failed: '%s'",
stamp,
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 68e0321..f6b96ca 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -936,7 +936,7 @@ check_battery_status (TrackerMinerFiles *mf)
if (!tracker_config_get_index_on_battery_first_time (mf->private->config)) {
g_message ("Running on battery, but not enabled, pausing");
should_pause = TRUE;
- } else if (tracker_db_manager_get_first_index_done()) {
+ } else if (tracker_db_manager_get_first_index_done ()) {
g_message ("Running on battery and first-time index "
"already done, pausing");
should_pause = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]