ref: d113f4436909b86630af10022e2a18c8872bc159
parent: 419776fc7241e8337fe84e8777fad095e4b13945
author: Simon Howard <[email protected]>
date: Sat Oct 27 13:57:33 EDT 2018
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.
--- a/src/i_glob.c
+++ b/src/i_glob.c
@@ -117,7 +117,7 @@
{
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.
free(glob->last_filename);