rust stat should call libc stat
This commit is contained in:
parent
66b16496e6
commit
b956ae38e1
1 changed files with 1 additions and 1 deletions
|
@ -529,7 +529,7 @@ pub fn stat(p: &Path) -> io::Result<FileAttr> {
|
|||
let p = cstr(p)?;
|
||||
let mut stat: stat64 = unsafe { mem::zeroed() };
|
||||
cvt(unsafe {
|
||||
libc::lstat(p.as_ptr(), &mut stat as *mut _ as *mut _)
|
||||
libc::stat(p.as_ptr(), &mut stat as *mut _ as *mut _)
|
||||
})?;
|
||||
Ok(FileAttr { stat })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue