[Evolution-hackers] [PATCH 2/2] Fix comparison of URI in e_cal_new_from_uri().
- From: David Woodhouse <dwmw2 infradead org>
- To: Patrick Ohly <patrick ohly gmx de>
- Cc: Evolution Hackers <evolution-hackers gnome org>
- Subject: [Evolution-hackers] [PATCH 2/2] Fix comparison of URI in e_cal_new_from_uri().
- Date: Fri, 15 Apr 2011 12:37:50 +0100
If the URI only had a relative_uri property, it should build the full URI
for comparison rather than just skipping it.
---
calendar/libecal/e-cal.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index 69ff9c7..a60abfb 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -988,8 +988,17 @@ check_uri (ESource *source, gpointer uri)
g_return_val_if_fail (uri != NULL, FALSE);
suri = e_source_peek_absolute_uri (source);
+ if (suri)
+ return !g_ascii_strcasecmp (suri, uri);
+ else {
+ gboolean ret;
+ gchar *suri2;
- return suri && g_ascii_strcasecmp (suri, uri) == 0;
+ suri2 = e_source_get_uri (source);
+ ret = !g_ascii_strcasecmp (suri2, uri);
+ g_free (suri2);
+ return ret;
+ }
}
/**
--
1.7.4.2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]