tracker r2428 - in trunk: . src/trackerd
- From: ifrade svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2428 - in trunk: . src/trackerd
- Date: Wed, 29 Oct 2008 13:22:38 +0000 (UTC)
Author: ifrade
Date: Wed Oct 29 13:22:38 2008
New Revision: 2428
URL: http://svn.gnome.org/viewvc/tracker?rev=2428&view=rev
Log:
Fixed #49063: empty space is not a valid keyword
Modified:
trunk/ChangeLog
trunk/src/trackerd/tracker-keywords.c
Modified: trunk/src/trackerd/tracker-keywords.c
==============================================================================
--- trunk/src/trackerd/tracker-keywords.c (original)
+++ trunk/src/trackerd/tracker-keywords.c Wed Oct 29 13:22:38 2008
@@ -286,6 +286,24 @@
g_error_free (actual_error);
return;
}
+
+ gchar **check;
+ gchar *stripped_value;
+ for (check = keywords; *check != NULL; check++) {
+ stripped_value = g_strstrip (g_strdup (*check));
+
+ if (tracker_is_empty_string (stripped_value)) {
+ g_free (stripped_value);
+ tracker_dbus_request_failed (request_id,
+ &actual_error,
+ "Blank spaces are not allowed as keywords");
+ dbus_g_method_return_error (context, actual_error);
+ g_free (id);
+ g_error_free (actual_error);
+ return;
+ }
+ g_free (stripped_value);
+ }
org_freedesktop_Tracker_Indexer_property_set (tracker_dbus_indexer_get_proxy (),
service_type,
@@ -300,6 +318,7 @@
NULL);
dbus_g_method_return_error (context, actual_error);
g_error_free (actual_error);
+ g_free (id);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]