File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -100,22 +100,23 @@ uint32_t ffPackagesGetNumElements(const char* dirname, bool isdir)
100100 {
101101 bool ok = false;
102102
103+ if (entry -> d_name [0 ] != '.' )
104+ {
103105#if !defined(__sun ) && !defined(__HAIKU__ )
104- if (entry -> d_type != DT_UNKNOWN && entry -> d_type != DT_LNK )
105- ok = entry -> d_type == (isdir ? DT_DIR : DT_REG );
106- else
106+ if (entry -> d_type != DT_UNKNOWN && entry -> d_type != DT_LNK )
107+ ok = entry -> d_type == (isdir ? DT_DIR : DT_REG );
108+ else
107109#endif
108- {
109- struct stat stbuf ;
110- if (fstatat (dirfd (dirp ), entry -> d_name , & stbuf , 0 ) == 0 )
111- ok = isdir ? S_ISDIR (stbuf .st_mode ) : S_ISREG (stbuf .st_mode );
110+ {
111+ struct stat stbuf ;
112+ if (fstatat (dirfd (dirp ), entry -> d_name , & stbuf , 0 ) == 0 )
113+ ok = isdir ? S_ISDIR (stbuf .st_mode ) : S_ISREG (stbuf .st_mode );
114+ }
112115 }
113116
114117 if (ok ) ++ num_elements ;
115118 }
116119
117- if (isdir && num_elements >= 2 )
118- num_elements -= 2 ; // accounting for . and ..
119120
120121 return num_elements ;
121122}
You can’t perform that action at this time.
0 commit comments