diff --git a/ChangeLog b/ChangeLog index 7f43f3fd40..f7b8580ce8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jul 10 17:41:54 2015 Nobuyoshi Nakada + + * dir.c (is_case_sensitive): get attributes by the file descriptor + of open directory, instead of using mount point name. + Fri Jul 10 10:46:02 2015 ksss * ext/stringio/stringio.c (writable): remove unnecessary check for diff --git a/dir.c b/dir.c index 9b62cb3e07..b75e6d63c5 100644 --- a/dir.c +++ b/dir.c @@ -1451,10 +1451,8 @@ is_case_sensitive(DIR *dirp) const vol_capabilities_attr_t *const cap = attrbuf[0].cap; const int idx = VOL_CAPABILITIES_FORMAT; const uint32_t mask = VOL_CAP_FMT_CASE_SENSITIVE; - struct statfs sf; - if (fstatfs(dirfd(dirp), &sf)) return -1; - if (getattrlist(sf.f_mntonname, &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW)) + if (fgetattrlist(dirfd(dirp), &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW)) return -1; if (!(cap->valid[idx] & mask)) return -1;