Describe the bug
While testing the POSIX implementation of the recursive_directory_iterator on macOS, I found the skip_permission_deniedoption to not work when iterating over my complete home directory hitting the ~/Library/Application Support/MobileSync folder. The increment still threw a filesystem_error. The reason is not wrong permissions, but "System Integrety Protection". The opendir results in an EPERM and not EACESS, and while EPERM was added to the increment handling of directory_iterator it is missing from the opendir error handling.
To Reproduce
Just try to iterate over a macOS SIP protected folder.
Expected behavior
The iterator should not enter the protected folder but continue to scan next to it.
Describe the bug
While testing the POSIX implementation of the
recursive_directory_iteratoron macOS, I found theskip_permission_deniedoption to not work when iterating over my complete home directory hitting the~/Library/Application Support/MobileSyncfolder. The increment still threw afilesystem_error. The reason is not wrong permissions, but "System Integrety Protection". Theopendirresults in an EPERM and not EACESS, and while EPERM was added to the increment handling ofdirectory_iteratorit is missing from theopendirerror handling.To Reproduce
Just try to iterate over a macOS SIP protected folder.
Expected behavior
The iterator should not enter the protected folder but continue to scan next to it.