Skip to content

Instantly share code, notes, and snippets.

@kosaki
Created Sep 16, 2015
Embed
What would you like to do?
diff --git a/dir.c b/dir.c
index aed3ecaa..1bf90ee 100644
--- a/dir.c
+++ b/dir.c
@@ -1809,6 +1809,13 @@ glob_helper(
new_pathtype = path_noent;
#else
new_pathtype = dp->d_type;
+ #ifdef DT_UNKNOWN
+ if (new_pathtype == DT_UNKNOWN) {
+ if (do_lstat(buf, &st, flags, enc) == 0) {
+ new_pathtype = IFTODT(st.st_mode);
+ }
+ }
+ #endif
#endif
}
(END)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment