]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Handle EPERM for filesystem access errors on MacOS [PR 99537]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 11 Mar 2021 16:43:51 +0000 (16:43 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 11 Mar 2021 17:52:56 +0000 (17:52 +0000)
commit8cfb387388a90730ab36ac24d9049677db633a11
treecc217cc04ae8b09ef734c7d4d945bb4241f395a8
parent67e397660611990efd98f9e4106c1ee81f6803a4
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++/99537
* 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.
libstdc++-v3/src/c++17/fs_dir.cc
libstdc++-v3/src/filesystem/dir-common.h
libstdc++-v3/src/filesystem/dir.cc