Project

General

Profile

Actions

Bug #9648

closed

Dir.glob('../*') shows unexpected result in a symbolic linked directory on Windows

Added by h.shirosaki (Hiroshi Shirosaki) about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-03-17 trunk 45356) [x64-mingw32]
[ruby-core:61552]

Description

Dir.glob('../*') shows unexpected result if current directory is a symbolic linked directory on Windows.
This issue seems to be introduced by r44802.

The following is a test case.

C:\foo>mklink /D bar V:\
symbolic link created for bar <<===>> V:\

C:\foo>cd bar

C:\foo\bar>ruby -ve "p Dir.glob('../*')"
ruby 1.9.3p392 (2013-02-22) [i386-mingw32]
["../a", "../bar"]

C:\foo\bar>\rubyinstaller\sandbox\ruby21_build\miniruby.exe -ve "p Dir.glob('../*')"
ruby 2.2.0dev (2014-02-04 trunk 45356) [x64-mingw32]
[]


C:\foo\bar>dir ..
 Volume in drive C is OS
 Volume Serial Number is 6629-B36B

 Directory of C:\foo

2014/03/17  18:58    <DIR>          .
2014/03/17  18:58    <DIR>          ..
2014/03/17  18:45                 6 a
2014/03/17  18:58    <SYMLINKD>     bar [V:\]
               1 File(s)              6 bytes
               3 Dir(s)  81,915,052,032 bytes free
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0