diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2017-05-15 11:18:35 +0300 |
---|---|---|
committer | Ernestas Kulik <ernestask@gnome.org> | 2017-05-15 15:06:23 +0300 |
commit | 8e8010de418327d9c5751b1f06e317d5ee9f75d2 (patch) | |
tree | a69f00774a3bd9f8da921c4552a70491385abe34 /src/nautilus-file-operations.c | |
parent | 48fd326ee854429873196721b0696bccebe86e16 (diff) | |
download | nautilus-8e8010de418327d9c5751b1f06e317d5ee9f75d2.tar.gz |
file-operations: copy: use automatic cleanup
https://bugzilla.gnome.org/show_bug.cgi?id=782650
Diffstat (limited to 'src/nautilus-file-operations.c')
-rw-r--r-- | 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 125733909..4a805c28e 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 |