[tracker/urho-sync] Fixed restore after tracker-processes -s
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/urho-sync] Fixed restore after tracker-processes -s
- Date: Mon, 24 Aug 2009 12:22:13 +0000 (UTC)
commit bbc39e88fa6affbe570676a304b7eee520e7e8e1
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Aug 24 14:21:25 2009 +0200
Fixed restore after tracker-processes -s
src/libtracker-db/tracker-db-backup.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-backup.c b/src/libtracker-db/tracker-db-backup.c
index be0b8b5..3403ed4 100644
--- a/src/libtracker-db/tracker-db-backup.c
+++ b/src/libtracker-db/tracker-db-backup.c
@@ -185,19 +185,26 @@ on_backup_temp_finished (gpointer user_data)
GFile *
tracker_db_backup_file (GFile **parent_out, const gchar *type)
{
- const gchar *db_file = tracker_db_manager_get_file (TRACKER_DB_COMMON);
GFile *file, *parent;
+ gchar *parent_path;
- file = g_file_new_for_path (db_file);
- parent = g_file_get_parent (file);
- g_object_unref (file);
+ parent_path = g_build_filename (g_get_user_data_dir (),
+ "tracker",
+ "data",
+ type,
+ NULL);
+ parent = g_file_new_for_path (parent_path);
file = g_file_get_child (parent, type);
if (parent_out) {
*parent_out = parent;
+ } else {
+ g_object_unref (parent);
}
+ g_free (parent_path);
+
return file;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]