From 9093b18ac251213072f4d64b653b38a3319ac908 Mon Sep 17 00:00:00 2001 From: Senthil Date: Thu, 17 Mar 2016 17:13:53 -0700 Subject: [PATCH] Check stat mode in addition to dirent type --- src/corehost/common/pal.unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corehost/common/pal.unix.cpp b/src/corehost/common/pal.unix.cpp index 117b07a89..171820e36 100644 --- a/src/corehost/common/pal.unix.cpp +++ b/src/corehost/common/pal.unix.cpp @@ -222,7 +222,7 @@ void pal::readdir(const pal::string_t& path, std::vector* list) continue; } - if (!S_ISREG(sb.st_mode)) + if (!S_ISREG(sb.st_mode) && !S_ISDIR(sb.st_mode)) { continue; }