summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2011-04-15 12:20:04 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-04-15 20:46:42 +0100
commit622b9cb84842f594e3c5eded1198196435b36e9b (patch)
tree6cda20c8c93afbdddb65546b1fb972ef47e125b8
parent6760f863ac6d569d170b7486677ce0e46878b114 (diff)
downloadevolution-data-server-622b9cb84842f594e3c5eded1198196435b36e9b.tar.gz
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. (cherry picked from commit 05c0b7b4bd06c9df459626e09713746d5efa2169)
-rw-r--r--calendar/libecal/e-cal.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index e1162f5b0..d9a813d64 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;
+ }
}
/**