mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 19:22:27 +00:00
Fix the build
This commit is contained in:
parent
77d3a07ff2
commit
c1a0b017e9
6 changed files with 161 additions and 61 deletions
6
third_party/libcxx/fs/directory_iterator.cpp
vendored
6
third_party/libcxx/fs/directory_iterator.cpp
vendored
|
@ -49,7 +49,7 @@ public:
|
|||
if (__stream_ == INVALID_HANDLE_VALUE) {
|
||||
ec = detail::make_windows_error(GetLastError());
|
||||
const bool ignore_permission_denied = bool(opts & directory_options::skip_permission_denied);
|
||||
if (ignore_permission_denied && ec.value() == static_cast<int>(errc::permission_denied))
|
||||
if (ignore_permission_denied && ec == errc::permission_denied)
|
||||
ec.clear();
|
||||
return;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ public:
|
|||
if ((__stream_ = ::opendir(root.c_str())) == nullptr) {
|
||||
ec = detail::capture_errno();
|
||||
const bool allow_eacces = bool(opts & directory_options::skip_permission_denied);
|
||||
if (allow_eacces && ec.value() == (int)errc::permission_denied)
|
||||
if (allow_eacces && ec == errc::permission_denied)
|
||||
ec.clear();
|
||||
return;
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ bool recursive_directory_iterator::__try_recursion(error_code* ec) {
|
|||
}
|
||||
if (m_ec) {
|
||||
const bool allow_eacess = bool(__imp_->__options_ & directory_options::skip_permission_denied);
|
||||
if (m_ec.value() == (int)errc::permission_denied && allow_eacess) {
|
||||
if (m_ec == errc::permission_denied && allow_eacess) {
|
||||
if (ec)
|
||||
ec->clear();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue