[tracker/journal-compression] 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] libtracker-db: Rotate all inactive journal files
- Date: Thu, 27 May 2010 14:25:07 +0000 (UTC)
commit 502cb55af9bb0ef372e325b8149d67a945593887
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]