[tracker/rss-enclosures] libtracker-db: Updated first index filename and set contents
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] libtracker-db: Updated first index filename and set contents
- Date: Sat, 26 Jun 2010 23:16:15 +0000 (UTC)
commit 587c84e2337cd68192705c4c41c8fb64fbc5db09
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]