[tracker/journal-compression-review: 6/12] libtracker-db: Rotate all inactive journal files
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/journal-compression-review: 6/12] libtracker-db: Rotate all inactive journal files
- Date: Wed, 23 Jun 2010 10:47:01 +0000 (UTC)
commit 2b2372771a3722449b6e4818dd43a77911c0daff
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]