From cb983f9915f3c65f8e62efef8926654f4145fdfb Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 12 Mar 2010 07:08:39 -0500 Subject: Bug 612679 - Crash when saving to a directory without permission --- e-util/e-file-utils.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'e-util') diff --git a/e-util/e-file-utils.c b/e-util/e-file-utils.c index 60db352f6d..571154733b 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); -- cgit