[nautilus] file-operations: duplicate: use automatic cleanup
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file-operations: duplicate: use automatic cleanup
- Date: Mon, 15 May 2017 12:07:49 +0000 (UTC)
commit 8a14b5329c8b5b104caa80a70b0aa038adbee5ee
Author: Ernestas Kulik <ernestask gnome org>
Date: Mon May 15 11:27:12 2017 +0300
file-operations: duplicate: use automatic cleanup
https://bugzilla.gnome.org/show_bug.cgi?id=782650
src/nautilus-file-operations.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index bc2996c..366da41 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -6928,9 +6928,9 @@ nautilus_file_operations_duplicate (GList *files,
NautilusCopyCallback done_callback,
gpointer done_callback_data)
{
- GTask *task;
+ g_autoptr (GTask) task = NULL;
CopyMoveJob *job;
- GFile *parent;
+ g_autoptr (GFile) parent = NULL;
job = op_job_new (CopyMoveJob, parent_window);
job->done_callback = done_callback;
@@ -6968,9 +6968,6 @@ nautilus_file_operations_duplicate (GList *files,
task = g_task_new (NULL, job->common.cancellable, copy_task_done, job);
g_task_set_task_data (task, job, NULL);
g_task_run_in_thread (task, copy_task_thread_func);
- g_object_unref (task);
-
- g_object_unref (parent);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]