[Bug libstdc++/99533] "operation not permitted" error on recursive_directory_iterator despite skip_permission_denied

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 29 20:03:22 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99533

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:6e5f662f1dd6e3d1a79e194c118c295b897fc7ef

commit r10-9593-g6e5f662f1dd6e3d1a79e194c118c295b897fc7ef
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Mar 11 16:43:51 2021 +0000

    libstdc++: Handle EPERM for filesystem access errors on MacOS [PR 99537]

    Contrary to what POSIX says, some directory operations on MacOS can fail
    with EPERM instead of EACCES, so we need to handle both.

    libstdc++-v3/ChangeLog:

            PR libstdc++/99533
            * src/c++17/fs_dir.cc (recursive_directory_iterator): Use new
            helper function to check for permission denied errors.
            * src/filesystem/dir.cc (recursive_directory_iterator):
            Likewise.
            * src/filesystem/dir-common.h (is_permission_denied_error): New
            helper function.

    (cherry picked from commit 8cfb387388a90730ab36ac24d9049677db633a11)


More information about the Gcc-bugs mailing list