No need to count all 150 or so entries, 3 is enough

This commit is contained in:
Erik Hofman 2016-07-03 09:39:52 +02:00
parent 82a9491de4
commit 98de216878

View File

@ -280,7 +280,7 @@ bool Dir::isEmpty() const
int n = 0;
dirent* d;
while( (d = readdir(dp)) !=NULL ) n++;
while( (d = readdir(dp)) !=NULL && (n < 4) ) n++;
closedir(dp);
return (n == 2); // '.' and '..' always exist