From: Tietew Date: 2003-11-18T21:33:11+09:00 Subject: [ruby-dev:21949] Re: [ruby-cvs] ruby, ruby/lib, ruby/test/fileutils: * lib/fileutils.rb (fu_same?): check by inode instead of path name, to detect two hard links pointing to the same content. On Tue, 18 Nov 2003 19:23:31 +0900 In article <20031118192427.09FF.USA@osb.att.ne.jp> [[ruby-dev:21946] Re: [ruby-cvs] ruby, ruby/lib, ruby/test/fileutils: * lib/fileutils.rb (fu_same?): check by inode instead of path name, to detect two hard links pointing to the same content.] "U.Nakamura" wrote: > | * lib/fileutils.rb (fu_same?): check by inode instead of path name, to detect two hard links pointing to the same content. > > 遺憾ながら、MSVCRT.dllを利用するプラットフォームでは、 > inoは常に0です... rb_w32_stat に手を加えて st_ino に有効な値(それでも NTFS オンリー だが)が入るようにしようと思ったら,NTFS のインデクス番号は 64bit で (see BY_HANDLE_INFORMATION),st_ino (_ino_t == unsigned short!) には絶対に入らない! がーん!! つーか runtime のソース見たら st_nlink = 1 ってハードコード… MSDNの説明と違うじゃん! —[ Tietew ]—————————————————————————— メ : tietew@tietew.net / tietew@raug.net / tietew@masuclub.net ホペ: http://www.tietew.net/ Tietew Windows Lab. http://www.masuclub.net/ 鱒倶楽部 指紋: 26CB 71BB B595 09C4 0153 81C4 773C 963A D51B 8CAA