Skip to content

Commit 3d3fbc9

Browse files
committed
Merge branch 'chmod_fix' of https://github.com/mattsu2020/coreutils into chmod_fix
2 parents 640fc64 + c1497fa commit 3d3fbc9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/uucore/src/lib/features/safe_traversal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,14 +401,14 @@ impl DirFd {
401401
OFlags::PATH | OFlags::NOFOLLOW | OFlags::CLOEXEC,
402402
Mode::empty(),
403403
)
404-
.map_err(|e| io::Error::from_raw_os_error(e.raw_os_error().unwrap_or(libc::EIO)))?;
404+
.map_err(|e| io::Error::from_raw_os_error(e.raw_os_error()))?;
405405

406406
let proc_path = format!("/proc/self/fd/{}\0", fd.as_raw_fd());
407407
let proc_cstr = std::ffi::CStr::from_bytes_with_nul(proc_path.as_bytes())
408408
.map_err(|_| io::Error::new(io::ErrorKind::InvalidInput, "invalid proc path"))?;
409409

410410
chmod(proc_cstr, Mode::from_bits_truncate(mode as u32))
411-
.map_err(|e| io::Error::from_raw_os_error(e.raw_os_error().unwrap_or(libc::EIO)))
411+
.map_err(|e| io::Error::from_raw_os_error(e.raw_os_error()))
412412
}
413413

414414
/// Change mode of this directory

0 commit comments

Comments
 (0)