[nautilus] file-operations: delete: use automatic cleanup
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file-operations: delete: use automatic cleanup
- Date: Mon, 15 May 2017 12:07:29 +0000 (UTC)
commit b1d57bc5a979aaff20c8f08217de0fd0390a4b38
Author: Ernestas Kulik <ernestask gnome org>
Date: Mon May 15 11:20:36 2017 +0300
file-operations: delete: use automatic cleanup
https://bugzilla.gnome.org/show_bug.cgi?id=782650
src/nautilus-file-operations.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 4a805c2..d665e61 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -2376,8 +2376,8 @@ delete_task_thread_func (GTask *task,
GCancellable *cancellable)
{
DeleteJob *job = task_data;
- GList *to_trash_files;
- GList *to_delete_files;
+ g_autoptr (GList) to_trash_files = NULL;
+ g_autoptr (GList) to_delete_files = NULL;
GList *l;
GFile *file;
gboolean confirmed;
@@ -2390,9 +2390,6 @@ delete_task_thread_func (GTask *task,
nautilus_progress_info_start (job->common.progress);
- to_trash_files = NULL;
- to_delete_files = NULL;
-
must_confirm_delete_in_trash = FALSE;
must_confirm_delete = FALSE;
files_skipped = 0;
@@ -2454,9 +2451,6 @@ delete_task_thread_func (GTask *task,
trash_files (common, to_trash_files, &files_skipped);
}
- g_list_free (to_trash_files);
- g_list_free (to_delete_files);
-
if (files_skipped == g_list_length (job->files))
{
/* User has skipped all files, report user cancel */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]