summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-20 05:33:00 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-20 05:33:00 +0000
commit3569ef534cbac13eec8c6ef10fe4a258ff2e0002 (patch)
tree2ab2c6f69c1182b19577ea1a35807a220258a71f
parenta8018aa415a446e6bf711f14a34acdc099e90487 (diff)
merge revision(s) 49170:
* 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/branches/ruby_2_2@49654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--dir.c9
-rw-r--r--version.h2
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e70567f9a7..64a642daf8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Feb 20 14:32:14 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * dir.c (dir_initialize): workaround of opendir failure at symlink
+ directories on Windows via CIFS.
+
Thu Feb 19 17:05:47 2015 Shugo Maeda <shugo@ruby-lang.org>
* class.c (rb_obj_singleton_methods): should use RTEST() to convert
diff --git a/dir.c b/dir.c
index 854bec6c08..82d04e4bb8 100644
--- a/dir.c
+++ b/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);
diff --git a/version.h b/version.h
index 2474471999..b4771ddc8f 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.2.0"
#define RUBY_RELEASE_DATE "2015-02-20"
-#define RUBY_PATCHLEVEL 62
+#define RUBY_PATCHLEVEL 63
#define RUBY_RELEASE_YEAR 2015
#define RUBY_RELEASE_MONTH 2