From c92b966c3d5ca630bb4dfa7b9a905be7a557bc2b Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Wed, 21 Dec 2005 13:42:05 +0000 Subject: [PATCH] fixes #305006 --- calendar/ChangeLog | 7 +++++++ calendar/backends/file/e-cal-backend-file.c | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 75e5a09..81d0d86 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2005-12-21 Chenthill Palanisamy + + Fixes #305006 + * backends/file/e-cal-backend-file.c: + (e_cal_backend_file_receive_objects): If the UID is not present + generate own uid and if the method is publish. + 2005-12-16 Chenthill Palanisamy Fixes #267330 diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c index 8999184..82686df 100644 --- a/calendar/backends/file/e-cal-backend-file.c +++ b/calendar/backends/file/e-cal-backend-file.c @@ -2332,8 +2332,18 @@ e_cal_backend_file_receive_objects (ECalBackendSync *backend, EDataCal *cal, con } if (!icalcomponent_get_uid (subcomp)) { - status = GNOME_Evolution_Calendar_InvalidObject; - goto error; + if (toplevel_method == ICAL_METHOD_PUBLISH) { + + char *new_uid = NULL; + + new_uid = e_cal_component_gen_uid (); + icalcomponent_set_uid (subcomp, new_uid); + g_free (new_uid); + } else { + status = GNOME_Evolution_Calendar_InvalidObject; + goto error; + } + } comps = g_list_prepend (comps, subcomp); -- 2.7.4