mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
dir.c: cifs symlinkd on OSX
* dir.c (dir_initialize): workaround of opendir failure at symlink directories on Windows via CIFS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
79219d9656
commit
10e74f035f
2 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Jan 7 19:19:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* dir.c (dir_initialize): workaround of opendir failure at symlink
|
||||
directories on Windows via CIFS.
|
||||
|
||||
Wed Jan 7 18:52:50 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* dir.c (need_normalization): not only HFS+, CIFS (SMB) is also
|
||||
|
|
9
dir.c
9
dir.c
|
@ -480,6 +480,15 @@ dir_initialize(int argc, VALUE *argv, VALUE dir)
|
|||
rb_gc();
|
||||
dp->dir = opendir(path);
|
||||
}
|
||||
#ifdef HAVE_GETATTRLIST
|
||||
else if (errno == EIO) {
|
||||
u_int32_t attrbuf[1];
|
||||
struct attrlist al = {ATTR_BIT_MAP_COUNT, 0};
|
||||
if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW) == 0) {
|
||||
dp->dir = opendir(path);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (dp->dir == NULL) {
|
||||
RB_GC_GUARD(dirname);
|
||||
rb_sys_fail_path(orig);
|
||||
|
|
Loading…
Reference in a new issue