Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/runtime/node/dir_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ mod platform {
};
if rc < 0 {
let e = sys::last_errno();
if e == libc::EINTR {
continue 'start_over;
}
// FreeBSD reports ENOENT when iterating an unlinked
// but still-open directory.
if e == libc::ENOENT {
Expand Down Expand Up @@ -344,10 +347,11 @@ mod platform {
)
};
if rc < 0 {
return Err(sys::Error::from_code_int(
sys::last_errno(),
Tag::getdents64,
));
let e = sys::last_errno();
if e == libc::EINTR {
continue 'start_over;
}
return Err(sys::Error::from_code_int(e, Tag::getdents64));
}
if rc == 0 {
return Ok(None);
Expand Down
Loading
Loading