[libdazzle] reaper: avoid unnecessary name fetch



commit 9fb26db4a333cf8181bd96f4b81f713e0604b872
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 24 17:01:00 2018 -0800

    reaper: avoid unnecessary name fetch

 src/files/dzl-directory-reaper.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/files/dzl-directory-reaper.c b/src/files/dzl-directory-reaper.c
index 91d60c2..d563be4 100644
--- a/src/files/dzl-directory-reaper.c
+++ b/src/files/dzl-directory-reaper.c
@@ -189,8 +189,7 @@ remove_directory_with_children (GFile         *file,
   while (NULL != (infoptr = g_file_enumerator_next_file (enumerator, cancellable, &enum_error)))
     {
       g_autoptr(GFileInfo) info = infoptr;
-      const gchar *name = g_file_info_get_name (info);
-      g_autoptr(GFile) child = g_file_get_child (file, name);
+      g_autoptr(GFile) child = g_file_enumerator_get_child (enumerator, info);
 
       if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]