[gnome-commander/gvfs_mount] Releases all resources used by the g_file_enumerator



commit 18558448043d76bd167ae6a0cb7440384a7d5643
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sun Jun 20 18:04:35 2021 +0200

    Releases all resources used by the g_file_enumerator

 src/dirlist.cc | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/dirlist.cc b/src/dirlist.cc
index 4a123ae53..0c8478299 100644
--- a/src/dirlist.cc
+++ b/src/dirlist.cc
@@ -137,6 +137,8 @@ void sync_list (GnomeCmdDir *dir)
     }
     while (gFileInfoTmp && !error);
 
+    g_file_enumerator_close (gFileEnumerator, nullptr, nullptr);
+
     dir->state = error ? GnomeCmdDir::STATE_EMPTY : GnomeCmdDir::STATE_LISTED;
     dir->done_func (dir, dir->gFileInfoList, error);
 }
@@ -155,6 +157,7 @@ static void enumerate_children_callback(GObject *direnum, GAsyncResult *result,
         dir->state = GnomeCmdDir::STATE_EMPTY;
         g_object_unref(direnum);
         dir->done_func (dir, dir->gFileInfoList, error);
+        g_file_enumerator_close(gFileEnumerator, nullptr, nullptr);
         g_error_free(error);
         return;
     }
@@ -164,6 +167,7 @@ static void enumerate_children_callback(GObject *direnum, GAsyncResult *result,
         dir->state = GnomeCmdDir::STATE_LISTED;
         DEBUG('l', "All files listed\n");
         dir->done_func (dir, dir->gFileInfoList, nullptr);
+        g_file_enumerator_close(gFileEnumerator, nullptr, nullptr);
         g_object_unref(direnum);
         return;
     }


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