fixes #305006
authorChenthill Palanisamy <pchen@src.gnome.org>
Wed, 21 Dec 2005 13:42:05 +0000 (13:42 +0000)
committerChenthill Palanisamy <pchen@src.gnome.org>
Wed, 21 Dec 2005 13:42:05 +0000 (13:42 +0000)
calendar/ChangeLog
calendar/backends/file/e-cal-backend-file.c

index 75e5a09..81d0d86 100644 (file)
@@ -1,3 +1,10 @@
+2005-12-21  Chenthill Palanisamy  <pchenthill@novell.com>
+
+       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  <pchenthill@novell.com>
 
        Fixes #267330
index 8999184..82686df 100644 (file)
@@ -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);