Issue #5819 has been updated by Yui NARUSE.

Status changed from Open to Assigned
Assignee set to Usaku NAKAMURA


----------------------------------------
Bug #5819: Windows??空???????????????????????????対??????File.stat ???失????????
https://bugs.ruby-lang.org/issues/5819

Author: Masateru OKAMOTO
Status: Assigned
Priority: Normal
Assignee: Usaku NAKAMURA
Category: 
Target version: 
ruby -v: ruby 1.9.3p0 (2011-10-30) [i386-mswin32_100]


Windows Vista32bit??????? 1.9.3-p0,1.9.2-p290,1.8.7-p330???
File.stat???失????????????(???????ActiveScriptRuby???????????確?)
???????Vista 32bit + ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mingw32]
?????????????????????


?????????F:??????????? ????????/?????????????????????????空????FAT16???
USB????????????????????????????????????????表示?????????
FileUtils.touch 'F:\\a.txt' ????????????????????????転?????
??????????????????????????????

c:\>dir F:\
 ???????? F ?????????? ????????????????????????
 ????????? ???????? 2850-20AE ????

 F:\ ?????????????

????????????????????????

c:\>ruby -v
ruby 1.9.3p0 (2011-10-30) [i386-mswin32_100]

C:\>irb
irb(main):001:0> require 'FileUtils'
=> true
irb(main):002:0> File.stat 'F:\\'
Errno::ENOENT: No such file or directory - F:\
        from (irb):2:in `stat'
        from (irb):2
        from C:/Program Files/Ruby-1.9.3-p0/bin/irb.bat:19:in `<main>'
irb(main):003:0> File.directory? 'F:\\'
=> false
irb(main):004:0> FileUtils.touch 'F:\\a.txt'
=> ["F:\\a.txt"]
irb(main):005:0> File.stat 'F:\\'
=> #<File::Stat dev=0x5, ino=0, mode=040755, nlink=1, uid=0, gid=0, rdev=0x5, si
ze=0, blksize=nil, blocks=nil, atime=1970-01-01 09:00:00 +0900, mtime=1970-01-01
 09:00:00 +0900, ctime=1970-01-01 09:00:00 +0900>
irb(main):006:0> File.directory? 'F:\\'
=> true


File.stat???失??????????????File.directory??????????
FileUtils.mv(foo, 'F:\\') ??? FileUtils.cp(bar, 'F:\\')???
dst???????????????????????????????失??????????????????????????????????????????????
????????????(mv???? Errno::EINVAL: Invalid argument?????)


????winnt_stat()???????????????????空??????????????????check_valid_dir()???
FindFirstFileW("F:\\.\\*", )???失??????????????'.'????????????????????
??桦??????????????????????????
?????????????????????????????????????丸???????????????????????????????


-- 
http://redmine.ruby-lang.org