The file browser was throwing away the first two files, assuming
they were "." and "..". Alas, this is no longer true on every Linux.
Now we actuallyc compare for these names, before skipping them.
(void) stat(".", &statBuf);
dir->mtime = statBuf.st_mtime;
- (void) readdir(dirp); /* throw away "." */
+ while (dp = readdir(dirp)) {
+ struct stat statBuf;
+ if(!strcmp(dp->d_name, ".")) continue; /* Throw away "." */
+ if(!strcmp(dp->d_name, "..")) continue; /* Throw away ".." */
#ifndef S_IFLNK
- (void) readdir(dirp); /* throw away ".." */
#endif /* ndef S_IFLNK */
-
- while (dp = readdir(dirp)) {
- struct stat statBuf;
if (i >= alloc) {
alloc = 2 * (alloc + 1);
result = (SFEntry *) XtRealloc((char *) result,