aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 0a42ce13ee..a672b534ff 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -3326,8 +3326,14 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
&remove);
/* FIXME Better error handling */
- if (remove)
- e_cal_remove_object (client, icalcomponent_get_uid (m->data), NULL);
+ if (remove) {
+ const char *uid = icalcomponent_get_uid (m->data);
+
+ if (e_cal_util_component_is_instance (m->data) || e_cal_util_component_has_recurrences (m->data))
+ e_cal_remove_object_with_mod (client, uid, NULL, CALOBJ_MOD_ALL, NULL);
+ else
+ e_cal_remove_object (client, uid, NULL);
+ }
}
g_list_foreach (objects, (GFunc) icalcomponent_free, NULL);