tracker r2609 - branches/turtle/src/tracker-indexer
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2609 - branches/turtle/src/tracker-indexer
- Date: Fri, 28 Nov 2008 12:14:46 +0000 (UTC)
Author: pvanhoof
Date: Fri Nov 28 12:14:46 2008
New Revision: 2609
URL: http://svn.gnome.org/viewvc/tracker?rev=2609&view=rev
Log:
Bugfix
Modified:
branches/turtle/src/tracker-indexer/tracker-removable-device.c
Modified: branches/turtle/src/tracker-indexer/tracker-removable-device.c
==============================================================================
--- branches/turtle/src/tracker-indexer/tracker-removable-device.c (original)
+++ branches/turtle/src/tracker-indexer/tracker-removable-device.c Fri Nov 28 12:14:46 2008
@@ -324,7 +324,7 @@
} AddMetadataInfo;
static void
-set_metadata (gpointer key, gpointer value, gpointer user_data)
+set_metadata (const gchar *key, const gpointer value, gpointer user_data)
{
raptor_statement *statement;
AddMetadataInfo *item = user_data;
@@ -366,14 +366,14 @@
if (!tracker_field_get_multiple_values (field)) {
- set_metadata (field, value, user_data);
+ set_metadata (tracker_field_get_name (field), value, user_data);
} else {
GList *list;
list = value;
while (list) {
- set_metadata (field, list->data, user_data);
+ set_metadata (tracker_field_get_name (field), list->data, user_data);
list = list->next;
}
}
@@ -392,6 +392,11 @@
raptor_uri *suri;
file = g_build_filename (mount_point, ".cache",
+ "metadata", NULL);
+ g_mkdir_with_parents (file, 0700);
+ g_free (file);
+
+ file = g_build_filename (mount_point, ".cache",
"metadata", "metadata.ttl", NULL);
target_file = fopen (file, "a");
@@ -413,10 +418,13 @@
raptor_serialize_start_to_file_handle (info->serializer,
suri, target_file);
+ set_metadata ("rdf:type", "File", info);
+
tracker_data_metadata_foreach (metadata,
foreach_in_metadata_set_metadata,
info);
+
g_free (info->about_uri);
raptor_serialize_end (info->serializer);
raptor_free_serializer (info->serializer);
@@ -435,13 +443,18 @@
const gchar *path)
{
#ifdef HAVE_RAPTOR
- gchar *file, *about_uri;
+ gchar *file, *about_uri, *dirname;
FILE *target_file;
raptor_uri *suri;
raptor_statement *statement;
raptor_serializer *serializer;
file = g_build_filename (mount_point, ".cache",
+ "metadata", NULL);
+ g_mkdir_with_parents (file, 0700);
+ g_free (file);
+
+ file = g_build_filename (mount_point, ".cache",
"metadata", "metadata.ttl", NULL);
target_file = fopen (file, "a");
@@ -508,6 +521,11 @@
raptor_serializer *serializer;
file = g_build_filename (mount_point, ".cache",
+ "metadata", NULL);
+ g_mkdir_with_parents (file, 0700);
+ g_free (file);
+
+ file = g_build_filename (mount_point, ".cache",
"metadata", "metadata.ttl", NULL);
target_file = fopen (file, "a");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]