[tracker/tracker-0.6] Fixes: NB#110310, metadata_get_multiple returns nothing if some file is missing
- From: Martyn James Russell <mr src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-0.6] Fixes: NB#110310, metadata_get_multiple returns nothing if some file is missing
- Date: Mon, 20 Apr 2009 08:23:16 -0400 (EDT)
commit efa20eb970d46ab7848f9e64bb93fc6c3d0e1f90
Author: Martyn Russell <martyn imendio com>
Date: Mon Apr 20 13:04:38 2009 +0100
Fixes: NB#110310, metadata_get_multiple returns nothing if some file is missing
---
src/trackerd/tracker-metadata.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/trackerd/tracker-metadata.c b/src/trackerd/tracker-metadata.c
index cc72296..d45e2ae 100644
--- a/src/trackerd/tracker-metadata.c
+++ b/src/trackerd/tracker-metadata.c
@@ -216,7 +216,11 @@ tracker_metadata_get_multiple (TrackerMetadata *object,
count = g_strv_length ((GStrv) uris);
values = g_ptr_array_sized_new (count);
- for (i = 0; i < count && !actual_error; i++) {
+ /* Don't stop on errors, we can have invalid URIs here. What
+ * this means is, this API can never fail unless the original
+ * parameters are crap.
+ */
+ for (i = 0; i < count; i++) {
GStrv strv;
strv = tracker_metadata_get_internal (object,
@@ -230,13 +234,8 @@ tracker_metadata_get_multiple (TrackerMetadata *object,
g_ptr_array_add (values, strv);
}
- if (G_UNLIKELY (actual_error)) {
- dbus_g_method_return_error (context, actual_error);
- g_error_free (actual_error);
- } else {
- dbus_g_method_return (context, values);
- tracker_dbus_request_success (request_id);
- }
+ dbus_g_method_return (context, values);
+ tracker_dbus_request_success (request_id);
g_ptr_array_foreach (values, (GFunc) g_strfreev, NULL);
g_ptr_array_free (values, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]