mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
file-operations: use the right prototype for empty trash callback
When unmounting, we might first prompt whether the trash should be emptied or not on the target volume. If we do so, make sure the callback from the empty trash job has the right prototype, to avoid crashing later trying to interpret a gboolean as a pointer to a data structure. https://bugzilla.gnome.org/show_bug.cgi?id=670595
This commit is contained in:
parent
5034434187
commit
819a5d14a3
1 changed files with 9 additions and 1 deletions
|
@ -2229,6 +2229,14 @@ prompt_empty_trash (GtkWindow *parent_window)
|
|||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
empty_trash_for_unmount_done (gboolean success,
|
||||
gpointer user_data)
|
||||
{
|
||||
UnmountData *data = user_data;
|
||||
do_unmount (data);
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_file_operations_unmount_mount_full (GtkWindow *parent_window,
|
||||
GMount *mount,
|
||||
|
@ -2260,7 +2268,7 @@ nautilus_file_operations_unmount_mount_full (GtkWindow *par
|
|||
job = op_job_new (EmptyTrashJob, parent_window);
|
||||
job->should_confirm = FALSE;
|
||||
job->trash_dirs = get_trash_dirs_for_mount (mount);
|
||||
job->done_callback = (NautilusOpCallback)do_unmount;
|
||||
job->done_callback = empty_trash_for_unmount_done;
|
||||
job->done_callback_data = data;
|
||||
g_io_scheduler_push_job (empty_trash_job,
|
||||
job,
|
||||
|
|
Loading…
Reference in a new issue