tracker r2602 - in branches/turtle: . src/trackerd
- From: ifrade svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2602 - in branches/turtle: . src/trackerd
- Date: Thu, 27 Nov 2008 15:33:48 +0000 (UTC)
Author: ifrade
Date: Thu Nov 27 15:33:48 2008
New Revision: 2602
URL: http://svn.gnome.org/viewvc/tracker?rev=2602&view=rev
Log:
Remove the previous file if it exists before saving
Modified:
branches/turtle/ChangeLog
branches/turtle/src/trackerd/tracker-backup.c
Modified: branches/turtle/src/trackerd/tracker-backup.c
==============================================================================
--- branches/turtle/src/trackerd/tracker-backup.c (original)
+++ branches/turtle/src/trackerd/tracker-backup.c Thu Nov 27 15:33:48 2008
@@ -45,6 +45,9 @@
tracker_turtle_init ();
/* TODO: temporary location */
+ if (g_file_test (TODO_TEMPORARY_LOCATION, G_FILE_TEST_EXISTS)) {
+ g_unlink (TODO_TEMPORARY_LOCATION);
+ }
turtle_file = tracker_turtle_open (TODO_TEMPORARY_LOCATION);
while (valid) {
@@ -87,6 +90,8 @@
g_message ("***** tracker_backup: Saving metadata in turtle file *****");
+ tracker_turtle_init ();
+
service = tracker_ontology_get_service_by_name ("Files");
data = tracker_data_query_backup_metadata (service);
@@ -100,12 +105,8 @@
static void
loading_turtle (void *user_data, const stmt *triple)
{
- gchar *subject, *predicate;
#ifdef HAVE_RAPTOR
- subject = (gchar *) raptor_uri_as_string ((raptor_uri *) triple->subject);
- predicate = g_strdup ((const gchar *) raptor_uri_as_string ((raptor_uri *) triple->predicate));
-
- g_print ("turtle loading <%s, %s, %s>\n",
+ g_debug ("turtle loading <%s, %s, %s>\n",
(gchar *)triple->subject,
(gchar *)triple->predicate,
(gchar *)triple->object);
@@ -119,8 +120,6 @@
{
g_message ("***** Restoring metadata from turtle file *****");
- tracker_turtle_init ();
-
tracker_turtle_process (TODO_TEMPORARY_LOCATION, loading_turtle, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]