glob: Allow symlinks to be globbed.

Instead of checking explicitly for regular files, check that matches
are not directories. Other file types probably aren't worth worrying
about.
This commit is contained in:
Simon Howard 2018-10-27 17:57:33 -04:00
parent 419776fc72
commit d113f44369

View file

@ -117,7 +117,7 @@ const char *I_NextGlob(glob_t *glob)
{ {
return NULL; return NULL;
} }
} while (de->d_type != DT_REG || !MatchesGlob(de->d_name, glob->glob)); } while (de->d_type == DT_DIR || !MatchesGlob(de->d_name, glob->glob));
// Return the fully-qualified path, not just the bare filename. // Return the fully-qualified path, not just the bare filename.
free(glob->last_filename); free(glob->last_filename);