close directory after reading entries

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

Signed-off-by: Martin Gysel <me@bearsh.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Martin Gysel 2012-09-27 23:05:54 +02:00 committed by Dirk Hohndel
parent 7f5ecb5bb7
commit 69aec317f0

View file

@ -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;
}