[PATCH] close directory after reading entries

me at bearsh.org me at bearsh.org
Thu Sep 27 14:05:54 PDT 2012


From: Martin Gysel <me at bearsh.org>

otherwise the filedescriptor keeps open which prevents a
smooth unmounting as long as subsurface is open

Signed-off-by: Martin Gysel <me at bearsh.org>
---
 uemis-downloader.c | 1 +
 1 Datei geändert, 1 Zeile hinzugefügt(+)

diff --git a/uemis-downloader.c b/uemis-downloader.c
index 0c6e33c..75eca6a 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -88,6 +88,7 @@ static int number_of_file(char *path)
 	GDir *dir = g_dir_open(path, 0, NULL);
 	while (g_dir_read_name(dir))
 		count++;
+	g_dir_close(dir);
 	return count;
 }
 
-- 
1.7.12



More information about the subsurface mailing list