aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-03-12 20:08:39 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-03-12 20:10:05 +0800
commitcb983f9915f3c65f8e62efef8926654f4145fdfb (patch)
tree13f5a2c07b0391781aaef378e3d9ea05d5e823ff
parentd051dc997b2ae8a8d6cc841b8ab9e6b827dba4e3 (diff)
downloadgsoc2013-evolution-cb983f9915f3c65f8e62efef8926654f4145fdfb.tar.gz
gsoc2013-evolution-cb983f9915f3c65f8e62efef8926654f4145fdfb.tar.zst
gsoc2013-evolution-cb983f9915f3c65f8e62efef8926654f4145fdfb.zip
Bug 612679 - Crash when saving to a directory without permission
-rw-r--r--e-util/e-file-utils.c18
1 files changed, 9 insertions, 9 deletions
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);