foxygit / doom Log in
commit d113f4436909b86630af10022e2a18c8872bc159
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Sat Oct 27 17:57:33 2018 -0400
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Sat Oct 27 17:57:33 2018 -0400

    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.
---
 src/i_glob.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/i_glob.c b/src/i_glob.c
index 28ebf5a4..fb344e1a 100644
--- a/src/i_glob.c
+++ b/src/i_glob.c
@@ -117,7 +117,7 @@ const char *I_NextGlob(glob_t *glob)
         {
             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);