mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
assert errno() == 0 before pathconf
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user