[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Found a Find.find() bug?

Robert La ferla

2/15/2007 7:52:00 PM

I was trying out Find.find() today and found that if you pass it a directory without a trailing slash, it doesn't traverse the directory. This seems like a bug to me. Is it? If so, how do I report it?

e.g.

require 'find'
Find.find("/tmp/") do |path|
puts path
end

vs.

require 'find'
Find.find("/tmp/") do |path|
puts path
end

4 Answers

Ara.T.Howard

2/15/2007 9:42:00 PM

0

Philip Hallstrom

2/15/2007 9:53:00 PM

0

Ben Bleything

2/15/2007 10:15:00 PM

0

On Fri, Feb 16, 2007, ara.t.howard@noaa.gov wrote:
> i __think__ this could happen if /tmp were a soft link... ??

Yup! This bites me all the time on osx:

folio ~/projects > ls /tmp
/tmp@

folio ~/projects > ls -l /tmp
lrwxr-xr-x 1 root admin 11 Dec 12 15:34 /tmp@ -> private/tmp

folio ~/projects > ls /tmp/
1f7ead7c295b42d3030a746438a8d222 2285/ ...

Ben

Ara.T.Howard

2/15/2007 10:28:00 PM

0