[tracker/journal-compression-review: 6/15] libtracker-db: Rotate all inactive journal files
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/journal-compression-review: 6/15] libtracker-db: Rotate all inactive journal files
- Date: Thu, 24 Jun 2010 13:41:31 +0000 (UTC)
commit d5de9f7cbf831721a851835e1bc8d40f40f90b43
Author: Jürg Billeter <j bitron ch>
Date: Wed May 26 16:55:18 2010 +0200
libtracker-db: Rotate all inactive journal files
src/libtracker-db/tracker-db-journal.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-journal.c b/src/libtracker-db/tracker-db-journal.c
index f6e2d23..6936725 100644
--- a/src/libtracker-db/tracker-db-journal.c
+++ b/src/libtracker-db/tracker-db-journal.c
@@ -1680,14 +1680,11 @@ tracker_db_journal_rotate (void)
g_rename (writer.journal_filename, fullpath);
- g_free (fullpath);
-
- if (max > 1 && needs_move) {
+ if (needs_move) {
GFile *source, *destination;
GFile *dest_dir;
gchar *filename;
- fullpath = g_strdup_printf ("%s.%d", writer.journal_filename, max - 1);
source = g_file_new_for_path (fullpath);
dest_dir = g_file_new_for_path (rotating_settings.rotate_to);
filename = g_path_get_basename (fullpath);
@@ -1700,8 +1697,9 @@ tracker_db_journal_rotate (void)
g_object_unref (destination);
g_object_unref (source);
- g_free (fullpath);
}
+ g_free (fullpath);
+
return db_journal_init_file (&writer, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]