Exception when using SortedDirectoryIterator #1926

This commit is contained in:
Alex Fabijanic 2017-10-06 17:50:01 -05:00
parent 31dfdb5b51
commit 888e193511
2 changed files with 9 additions and 3 deletions

View File

@ -78,7 +78,13 @@ void SortedDirectoryIterator::scan()
DirectoryIterator end_it; DirectoryIterator end_it;
while (*this != end_it) while (*this != end_it)
{ {
if ((*this)->isDirectory()) bool isDir = false;
try
{
isDir = (*this)->isDirectory();
}
catch (...) { }
if (isDir)
_directories.push_back(_path.toString()); _directories.push_back(_path.toString());
else else
_files.push_back(_path.toString()); _files.push_back(_path.toString());