[evolution-data-server] Set new object properly on object modify in a file calendar backend



commit c0e0ff6527e3990918918a9b11c4fbd119689e95
Author: Milan Crha <mcrha redhat com>
Date:   Mon Apr 27 12:02:28 2009 +0200

    Set new object properly on object modify in a file calendar backend
    
    	** Part of fix for bug #575773
---
 calendar/ChangeLog                          |    8 ++++++++
 calendar/backends/file/e-cal-backend-file.c |    8 ++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 6394d6b..6a3d548 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-27  Milan Crha  <mcrha redhat com>
+
+	** Part of fix for bug #575773
+
+	* backends/file/e-cal-backend-file.c:
+	(e_cal_backend_file_modify_object):
+	Always set a new object properly, as a backend modifies it.
+
 2009-04-24  Milan Crha  <mcrha redhat com>
 
 	** Part of fix for bug #381132
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index 003c07e..d76145d 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -2087,6 +2087,9 @@ e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, const
 
 			save (cbfile);
 
+			if (new_object)
+				*new_object = e_cal_component_get_as_string (comp);
+
 			g_static_rec_mutex_unlock (&priv->idle_save_rmutex);
 			g_free (rid);
 			return GNOME_Evolution_Calendar_Success;
@@ -2175,8 +2178,6 @@ e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, const
 		rid = NULL;
 		break;
 	case CALOBJ_MOD_ALL :
-		*new_object = e_cal_component_get_as_string (comp);
-
 		/* Remove the old version */
 		if (old_object)
 			*old_object = e_cal_component_get_as_string (obj_data->full_object);
@@ -2220,6 +2221,9 @@ e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, const
 	save (cbfile);
 	g_free (rid);
 
+	if (new_object)
+		*new_object = e_cal_component_get_as_string (comp);
+
 	g_static_rec_mutex_unlock (&priv->idle_save_rmutex);
 	return GNOME_Evolution_Calendar_Success;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]