Skip to content

Exception when using SortedDirectoryIterator #1926

@pcipriano

Description

@pcipriano

void SortedDirectoryIterator::scan()

The function above suffers of the same problem mentioned in #236. I fixed the problem by wrapping the isDirectory call in a try/catch block like this:

bool isDir = false;
try
{
    isDir = (*this)->isDirectory();
}
catch (...)
{
}

if (isDir)
    _directories.push_back(_path.toString());
else
    _files.push_back(_path.toString());        

DirectoryIterator::operator++();

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions