mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-07-22 05:44:24 +08:00
refs #77, fix skip_permission_denied inconsistency
This commit is contained in:
parent
7e37433f31
commit
f824d0d46b
@ -5328,12 +5328,10 @@ public:
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user