[evolution-data-server] Bug 647873 [1/2] - Fix comparison of URI in e_cal_new_from_uri().
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 647873 [1/2] - Fix comparison of URI in e_cal_new_from_uri().
- Date: Fri, 15 Apr 2011 15:12:57 +0000 (UTC)
commit 05c0b7b4bd06c9df459626e09713746d5efa2169
Author: David Woodhouse <David Woodhouse intel com>
Date: Fri Apr 15 12:20:04 2011 +0100
Bug 647873 [1/2] - Fix comparison of URI in e_cal_new_from_uri().
If the URI only had a relative_uri property, we should build the full URI
for comparison rather than just skipping it. Otherwise we get false
mismatches.
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 e1162f5..d9a813d 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -987,8 +987,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;
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]