diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-29 08:13:42 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-29 08:13:42 +0000 |
commit | 47f6196cf023d466cafeb454e2188c7353b8397d (patch) | |
tree | daac026d5d3a4fadf48ee132a80c5a93fbca82fc /win32/file.c | |
parent | c0b13e292fa93ed272ed07b689f0051f98f2cf81 (diff) |
* win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volume
mount point should be treated as directory, not symlink.
[ruby-core:72483] [Bug #11874]
* win32/win32.c (rb_w32_read_reparse_point): check the reparse point is
a volume mount point or not.
* win32/file.c (rb_readlink): follow above change (but this pass won't
be used).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/file.c')
-rw-r--r-- | win32/file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/win32/file.c b/win32/file.c index 46a7ec7d5d..85aea15d71 100644 --- a/win32/file.c +++ b/win32/file.c @@ -689,7 +689,10 @@ rb_readlink(VALUE path, rb_encoding *resultenc) ALLOCV_END(wpathbuf); if (e) { ALLOCV_END(wtmp); - rb_syserr_fail_path(rb_w32_map_errno(e), path); + if (e != -1) + rb_syserr_fail_path(rb_w32_map_errno(e), path); + else /* not symlink; maybe volume mount point */ + rb_syserr_fail_path(EINVAL, path); } enc = resultenc; cp = path_cp = code_page(enc); |