Skip to content

Commit

Permalink
refs #77, fix skip_permission_denied inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
gulrak committed Oct 24, 2020
1 parent 7e37433 commit f824d0d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/ghc/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5328,12 +5328,10 @@ class directory_iterator::impl
{
if (!path.empty()) {
_dir = ::opendir(path.native().c_str());
}
if (!path.empty()) {
if (!_dir) {
auto error = errno;
_base = filesystem::path();
if (error != EACCES || (options & directory_options::skip_permission_denied) == directory_options::none) {
if ((error != EACCES && error != EPERM) || (options & directory_options::skip_permission_denied) == directory_options::none) {
_ec = detail::make_system_error();
}
}
Expand Down

0 comments on commit f824d0d

Please sign in to comment.