assert errno() == 0 before pathconf

This commit is contained in:
Jeong YunWon
2023-02-27 14:22:04 +09:00
parent 1e09c63282
commit e25b89d49a

View File

@@ -1856,6 +1856,7 @@ pub mod module {
use nix::errno::{self, Errno};
Errno::clear();
debug_assert_eq!(errno::errno(), 0);
let raw = match path {
PathOrFd::Path(path) => {
let path = CString::new(path.into_bytes())