then the only print out is “c:\temp”, all files in that directory are
ignored. It should be pretty easy to verify. It almost seems like find
module has a dependency on File module, and win32/file is in odd with
Aha! The culprit appears to be lstat. In the find module you’ll see
if File.lstat(file).directory? then
That returns nil when you include win32-file:
irb(main):001:0> dir = “C:\TMP”
=> #<File::Stat dev=0x2, ino=0, mode=040755, nlink=1, uid=0, gid=0,
rdev=0x2, size=0, blksize=nil, blocks=nil, atime=Thu
Nov 02 09:56:43 -0700 2006, mtime=Fri Oct 21 09:47:09 -0600 2005,
ctime=Fri Oct 21 09:47:09 -0600 2005>
irb(main):004:0> require ‘win32/file’
I didn’t reallize lstat was implemented on Windows. I’m guessing it’s
an alias, so I’ll need to check the source. But, that’s definitely a
bug in win32-file (or rather, win32-file-stat).
I’ll get this fixed and put out a release asap.