diff options
author | Benjamin Otte <otte@redhat.com> | 2010-03-29 15:50:41 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-03-29 16:19:30 +0200 |
commit | 5af6a1dbdd2c6a61b515a5bd64350db3af16dae7 (patch) | |
tree | 6e235f4254bc0783256b40b7aa683c66af5606f2 | |
parent | 9fd065a09b362d1be7c331f50bbb92f4f69bb487 (diff) | |
download | gvfs-5af6a1dbdd2c6a61b515a5bd64350db3af16dae7.tar.gz |
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
-rw-r--r-- | client/gdaemonfileenumerator.c | 7 |
1 files 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); } |