1
Fork 0

Merge pull request #25 from Wind-River/stat

rust stat should call libc stat
This commit is contained in:
n-salim 2019-09-20 16:20:29 -07:00 committed by GitHub
commit 494d83c892
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 })
}