diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-10 08:41:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-10 08:41:57 +0000 |
commit | 5698e1bee42e8be06aa74a98c73a42566fe17807 (patch) | |
tree | 2201d472689f5e370b299bfa436710fc3d84d2bf | |
parent | 99f7e571fb75c896f6ac4018ae57176a3f6a2b78 (diff) | |
download | ruby-5698e1bee42e8be06aa74a98c73a42566fe17807.tar.gz |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | dir.c | 4 |
2 files changed, 6 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Fri Jul 10 17:41:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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 <co000ri@gmail.com> * ext/stringio/stringio.c (writable): remove unnecessary check for @@ -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; |