Skip to content

Commit

Permalink
fix wonky rebase conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
iximeow committed Feb 28, 2020
1 parent 18e9946 commit b43b4bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/wasi-common/src/sys/unix/bsd/hostcalls_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub(crate) fn path_unlink_file(resolved: PathGet) -> Result<()> {
// is created before fstatat sees it, we're racing with that change anyway
// and unlinkat could have legitimately seen the directory if the race had
// turned out differently.
use yanix::file::{fstatat, SFlag};
use yanix::file::{fstatat, FileType};

if errno == Errno::EPERM {
if let Ok(stat) = unsafe {
Expand All @@ -33,7 +33,7 @@ pub(crate) fn path_unlink_file(resolved: PathGet) -> Result<()> {
AtFlag::SYMLINK_NOFOLLOW,
)
} {
if SFlag::from_bits_truncate(stat.st_mode).contains(SFlag::IFDIR) {
if FileType::from_stat_st_mode(stat.st_mode) == FileType::Directory {
errno = Errno::EISDIR;
}
} else {
Expand Down

0 comments on commit b43b4bf

Please sign in to comment.