From bcaca7545462d0f61adc1260ab6084f0deb253f2 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Fri, 18 Jan 2013 20:33:19 +0400 Subject: Fix listing of POSIX symlinks. --- src/unix/system.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/unix/system.c') diff --git a/src/unix/system.c b/src/unix/system.c index a4d341a..68e685f 100644 --- a/src/unix/system.c +++ b/src/unix/system.c @@ -355,7 +355,9 @@ void Sys_ListFiles_r(const char *path, #ifdef _DIRENT_HAVE_D_TYPE // try to avoid stat() if possible - if (!(flags & FS_SEARCH_EXTRAINFO)) { + if (!(flags & FS_SEARCH_EXTRAINFO) + && ent->d_type != DT_UNKNOWN + && ent->d_type != DT_LNK) { st.st_mode = DTTOIF(ent->d_type); } #endif -- cgit v1.2.3