Skip to content

access: file: properly report local files on Darwin

While Darwin implements fstatvfs, the statvfs structures f_flag field is only defined to contain two flags, ST_RDONLY and ST_NOSUID. So the check for MNT_LOCAL would always be false, reporting all files as non-local.

To mitigate that, on Darwin we can just use fstatfs and check statfs.f_flags for MNT_LOCAL.

Merge request reports