[tracker/writeback] Some bugfixes
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/writeback] Some bugfixes
- Date: Wed, 18 Nov 2009 10:48:48 +0000 (UTC)
commit dec9a60f2536c47e1e444d60b7f1f4b53c5238c0
Author: Philip Van Hoof <philip codeminded be>
Date: Wed Nov 18 11:47:19 2009 +0100
Some bugfixes
src/libtracker-common/tracker-sparql-builder.vala | 6 +++---
src/plugins/evolution/tracker-evolution-plugin.c | 14 ++++++++------
src/tracker-writeback/tracker-writeback-mp3.c | 2 ++
3 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/src/libtracker-common/tracker-sparql-builder.vala b/src/libtracker-common/tracker-sparql-builder.vala
index 00bf7c7..3786467 100644
--- a/src/libtracker-common/tracker-sparql-builder.vala
+++ b/src/libtracker-common/tracker-sparql-builder.vala
@@ -51,12 +51,12 @@ public class Tracker.SparqlBuilder : Object {
str.append ("DROP GRAPH <%s>\n".printf (iri));
}
- public void insert_open (string? iri)
+ public void insert_open (string? graph)
requires (state == State.UPDATE)
{
states += State.INSERT;
- if (iri != null)
- str.append ("INSERT INTO <%s> {\n".printf (iri));
+ if (graph != null)
+ str.append ("INSERT INTO <%s> {\n".printf (graph));
else
str.append ("INSERT {\n");
}
diff --git a/src/plugins/evolution/tracker-evolution-plugin.c b/src/plugins/evolution/tracker-evolution-plugin.c
index 2e872ad..f474f7f 100644
--- a/src/plugins/evolution/tracker-evolution-plugin.c
+++ b/src/plugins/evolution/tracker-evolution-plugin.c
@@ -721,21 +721,22 @@ on_folder_summary_changed (CamelFolder *folder,
/* The FROM uri is not exactly right here, but we just want
* graph != NULL in tracker-store/tracker-writeback.c */
- GString *sparql = g_string_new ("DELETE FROM <"DATASOURCE_URN"> { \n");
+ GString *sparql = g_string_new ("");
for (i = 0; i< changes->uid_removed->len; i++) {
/* This is not a path but a URI, don't use the OS's
* directory separator here */
- g_string_append_printf (sparql, "\t<%s%s/%s> a rdfs:Resource . \n",
+ g_string_append_printf (sparql, "DELETE FROM <%s%s/%s> { <%s%s/%s> a rdfs:Resource }\n ",
+ em_uri,
+ camel_folder_get_full_name (folder),
+ (char*) changes->uid_removed->pdata[i],
em_uri,
camel_folder_get_full_name (folder),
(char*) changes->uid_removed->pdata[i]);
}
- g_string_append_c (sparql, '}');
-
send_sparql_update (info->self, sparql->str);
g_string_free (sparql, TRUE);
}
@@ -1198,10 +1199,11 @@ introduce_store_deal_with_deleted (TrackerEvolutionPlugin *self,
/* The FROM uri is not exactly right here, but we just want
* graph != NULL in tracker-store/tracker-writeback.c */
- GString *sparql = g_string_new ("DELETE FROM <"DATASOURCE_URN"> { \n");
+ GString *sparql = g_string_new ("");
for (i = 0; i < subjects_a->len; i++) {
- g_string_append_printf (sparql, "\t<%s> a rdfs:Resource . \n",
+ g_string_append_printf (sparql, "DELETE FROM <%s> { <%s> a rdfs:Resource } \n",
+ (gchar *) g_ptr_array_index (subjects_a, i),
(gchar *) g_ptr_array_index (subjects_a, i));
}
diff --git a/src/tracker-writeback/tracker-writeback-mp3.c b/src/tracker-writeback/tracker-writeback-mp3.c
index ef4cb03..09edd2d 100644
--- a/src/tracker-writeback/tracker-writeback-mp3.c
+++ b/src/tracker-writeback/tracker-writeback-mp3.c
@@ -21,6 +21,8 @@
*/
#include <id3.h>
+#include <glib-object.h>
+#include <gio/gio.h>
#include <libtracker-common/tracker-ontology.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]