diff --git a/src/path.rs b/src/path.rs index f4b80cbfd..4737c41f0 100644 --- a/src/path.rs +++ b/src/path.rs @@ -713,14 +713,14 @@ fn path_remoteness(path: &wstr) -> DirRemoteness { // In practice the only system to define it is NetBSD. let local_flag = ST_LOCAL() | MNT_LOCAL(); if local_flag != 0 { - let mut buf: libc::statvfs = unsafe { std::mem::zeroed() }; - if unsafe { libc::statvfs(narrow.as_ptr(), &mut buf) } < 0 { + let mut buf: libc::statfs = unsafe { std::mem::zeroed() }; + if unsafe { libc::statfs(narrow.as_ptr(), &mut buf) } < 0 { return DirRemoteness::unknown; } // statfs::f_flag is hard-coded as 64-bits on 32/64-bit FreeBSD but it's a (4-byte) // long on 32-bit NetBSD.. and always 4-bytes on macOS (even on 64-bit builds). #[allow(clippy::useless_conversion)] - return if u64::from(buf.f_flag) & local_flag != 0 { + return if u64::from(buf.f_flags) & local_flag != 0 { DirRemoteness::local } else { DirRemoteness::remote