Skip to content

Commit

Permalink
Better fix for Fuchsia
Browse files Browse the repository at this point in the history
  • Loading branch information
hkratz authored and pietroalbini committed Jan 20, 2022
1 parent 68976d1 commit 1c63ec4
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions library/std/src/sys/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1628,20 +1628,13 @@ mod remove_dir_impl {
target_os = "solaris",
target_os = "illumos",
target_os = "haiku",
target_os = "vxworks"
target_os = "vxworks",
target_os = "fuchsia"
))]
fn is_dir(_ent: &DirEntry) -> Option<bool> {
None
}

#[cfg(target_os = "fuchsia")]
fn is_dir(ent: &DirEntry) -> Option<bool> {
match ent.entry.d_type {
libc::DT_DIR => Some(true),
_ => Some(false),
}
}

#[cfg(not(any(
target_os = "solaris",
target_os = "illumos",
Expand Down

0 comments on commit 1c63ec4

Please sign in to comment.