summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-10 08:41:57 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-10 08:41:57 (GMT)
commitd8f628e582cb81c212979b186638ce69f1bd953e (patch)
tree2201d472689f5e370b299bfa436710fc3d84d2bf /dir.c
parentf7946774dd2dda12bc4c538b79c4b1af3b87a903 (diff)
dir.c: get attributes by fd
* dir.c (is_case_sensitive): get attributes by the file descriptor of open directory, instead of using mount point name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/dir.c b/dir.c
index 9b62cb3..b75e6d6 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;