[nautilus] file-operations: copy: use automatic cleanup
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file-operations: copy: use automatic cleanup
- Date: Mon, 15 May 2017 12:07:24 +0000 (UTC)
commit 8e8010de418327d9c5751b1f06e317d5ee9f75d2
Author: Ernestas Kulik <ernestask gnome org>
Date: Mon May 15 11:18:35 2017 +0300
file-operations: copy: use automatic cleanup
https://bugzilla.gnome.org/show_bug.cgi?id=782650
src/nautilus-file-operations.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 1257339..4a805c2 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -5812,14 +5812,12 @@ copy_task_thread_func (GTask *task,
CommonJob *common;
SourceInfo source_info;
TransferInfo transfer_info;
- char *dest_fs_id;
+ g_autofree char *dest_fs_id = NULL;
GFile *dest;
job = task_data;
common = &job->common;
- dest_fs_id = NULL;
-
nautilus_progress_info_start (job->common.progress);
scan_sources (job->files,
@@ -5828,7 +5826,7 @@ copy_task_thread_func (GTask *task,
OP_KIND_COPY);
if (job_aborted (common))
{
- goto aborted;
+ return;
}
if (job->destination)
@@ -5850,7 +5848,7 @@ copy_task_thread_func (GTask *task,
g_object_unref (dest);
if (job_aborted (common))
{
- goto aborted;
+ return;
}
g_timer_start (job->common.time);
@@ -5859,10 +5857,6 @@ copy_task_thread_func (GTask *task,
copy_files (job,
dest_fs_id,
&source_info, &transfer_info);
-
-aborted:
-
- g_free (dest_fs_id);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]