7 Nov
2018
7 Nov
'18
5:38 p.m.
Dmitry Timoshkov <dmitry(a)baikal.ru> writes:
+static int is_directory_empty( struct fd *fd ) +{ + DIR *dir; + int count = 0; + + if ((dir = fdopendir( fd->unix_fd ))) + { + while (readdir( dir ) != NULL && count <= 2) + count++; + + closedir( dir ); + }
This won't work, closedir() is going to close the file descriptor. -- Alexandre Julliard julliard(a)winehq.org