ruby-changes:39127
From: nobu <ko1@a...>
Date: Fri, 10 Jul 2015 17:42:31 +0900 (JST)
Subject: [ruby-changes:39127] nobu:r51208 (trunk): dir.c: get attributes by fd
nobu 2015-07-10 17:41:57 +0900 (Fri, 10 Jul 2015) New Revision: 51208 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51208 Log: 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. Modified files: trunk/ChangeLog trunk/dir.c Index: ChangeLog =================================================================== --- ChangeLog (revision 51207) +++ ChangeLog (revision 51208) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jul 10 17:41:54 2015 Nobuyoshi Nakada <nobu@r...> + + * 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@g...> * ext/stringio/stringio.c (writable): remove unnecessary check for Index: dir.c =================================================================== --- dir.c (revision 51207) +++ dir.c (revision 51208) @@ -1451,10 +1451,8 @@ is_case_sensitive(DIR *dirp) https://github.com/ruby/ruby/blob/trunk/dir.c#L1451 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/