[tracker/checkpoint: 3/17] libtracker-data: Store backup in subdirectory in backup test
- From: JÃrg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/checkpoint: 3/17] libtracker-data: Store backup in subdirectory in backup test
- Date: Mon, 27 Jun 2011 11:27:32 +0000 (UTC)
commit cb366c21f42e03cdc70d48e697567d1bc562177d
Author: JÃrg Billeter <j bitron ch>
Date: Mon Jun 27 12:15:33 2011 +0200
libtracker-data: Store backup in subdirectory in backup test
Restore will move backup file to temporary location otherwise.
tests/libtracker-data/tracker-backup-test.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/tests/libtracker-data/tracker-backup-test.c b/tests/libtracker-data/tracker-backup-test.c
index 36e4888..6b23ba3 100644
--- a/tests/libtracker-data/tracker-backup-test.c
+++ b/tests/libtracker-data/tracker-backup-test.c
@@ -90,7 +90,7 @@ check_content_in_db (gint expected_instances, gint expected_relations)
static void
test_backup_and_restore_helper (gboolean journal)
{
- gchar *data_prefix, *data_filename, *backup_filename, *db_location, *meta_db;
+ gchar *data_prefix, *data_filename, *backup_location, *backup_filename, *db_location, *meta_db;
GError *error = NULL;
GFile *backup_file;
gchar *test_schemas[5] = { NULL, NULL, NULL, NULL, NULL };
@@ -130,11 +130,12 @@ test_backup_and_restore_helper (gboolean journal)
/* Check everything is correct */
check_content_in_db (3, 1);
- backup_filename = g_build_path (G_DIR_SEPARATOR_S,
- db_location, "tracker.dump",
- NULL);
+ backup_location = g_build_filename (db_location, "backup", NULL);
+ g_mkdir (backup_location, 0777);
+ backup_filename = g_build_filename (backup_location, "tracker.dump", NULL);
backup_file = g_file_new_for_path (backup_filename);
g_free (backup_filename);
+ g_free (backup_location);
tracker_data_backup_save (backup_file,
backup_finished_cb,
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]