[evolution] Bug 612679 - Crash when saving to a directory without permission



commit cb983f9915f3c65f8e62efef8926654f4145fdfb
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Mar 12 07:08:39 2010 -0500

    Bug 612679 - Crash when saving to a directory without permission

 e-util/e-file-utils.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/e-util/e-file-utils.c b/e-util/e-file-utils.c
index 60db352..5711547 100644
--- a/e-util/e-file-utils.c
+++ b/e-util/e-file-utils.c
@@ -68,20 +68,20 @@ file_replace_contents_cb (GFile *file,
 
 	result = e_io_activity_get_async_result (E_IO_ACTIVITY (activity));
 
-	g_object_set_data_full (
-		G_OBJECT (result),
-		"__new_etag__", new_etag,
-		(GDestroyNotify) g_free);
-
-	g_simple_async_result_set_op_res_gboolean (
-		G_SIMPLE_ASYNC_RESULT (result), success);
-
-	if (error != NULL) {
+	if (error == NULL) {
+		g_object_set_data_full (
+			G_OBJECT (result),
+			"__new_etag__", new_etag,
+			(GDestroyNotify) g_free);
+	} else {
 		g_simple_async_result_set_from_error (
 			G_SIMPLE_ASYNC_RESULT (result), error);
 		g_error_free (error);
 	}
 
+	g_simple_async_result_set_op_res_gboolean (
+		G_SIMPLE_ASYNC_RESULT (result), success);
+
 	e_activity_complete (activity);
 
 	g_object_unref (activity);



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