https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94900
Ton van den Heuvel <tonvandenheuvel at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|UNCONFIRMED |RESOLVED --- Comment #2 from Ton van den Heuvel <tonvandenheuvel at gmail dot com> --- I found that specifying `std::filesystem::directory_options::skip_permission_denied` does list all entries for `recursive_directory_iterator`. I no longer think this is a bug; the recursive directory iterator stops iteration once it tries to access a directory it does not have permissions for. The regular directory_iterator does not try to go down the unreadable directories, resulting in iteration to continue.