From 5af6a1dbdd2c6a61b515a5bd64350db3af16dae7 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 29 Mar 2010 15:50:41 +0200 Subject: Use complete_with_cancellable() in file enumerator This makes sure we always return ERROR_CANCELLED, just like we want to guarantee and avoids crashes in the file chooser. https://bugzilla.gnome.org/show_bug.cgi?id=614099 --- client/gdaemonfileenumerator.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/gdaemonfileenumerator.c b/client/gdaemonfileenumerator.c index be275451..77b7ec49 100644 --- a/client/gdaemonfileenumerator.c +++ b/client/gdaemonfileenumerator.c @@ -276,9 +276,10 @@ trigger_async_done (GDaemonFileEnumerator *daemon, gboolean ok) (GDestroyNotify)free_info_list); } - g_simple_async_result_complete_in_idle (daemon->async_res); + _g_simple_async_result_complete_with_cancellable (daemon->async_res, + daemon->async_cancel); - daemon->async_cancel = 0; + daemon->async_cancel = NULL; daemon->cancelled_tag = 0; if (daemon->timeout_tag != 0) @@ -549,7 +550,7 @@ g_daemon_file_enumerator_close_async (GFileEnumerator *enumerator, res = g_simple_async_result_new (G_OBJECT (enumerator), callback, user_data, g_daemon_file_enumerator_close_async); - g_simple_async_result_complete_in_idle (res); + _g_simple_async_result_complete_with_cancellable (res, cancellable); g_object_unref (res); } -- cgit v1.2.1