Check stat mode in addition to dirent type

This commit is contained in:
Senthil 2016-03-17 17:13:53 -07:00
parent 778e63a5a6
commit 9093b18ac2

View file

@ -222,7 +222,7 @@ void pal::readdir(const pal::string_t& path, std::vector<pal::string_t>* list)
continue;
}
if (!S_ISREG(sb.st_mode))
if (!S_ISREG(sb.st_mode) && !S_ISDIR(sb.st_mode))
{
continue;
}