From c42184c8bb49c397064bfa1260914fd9b90b9b22 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 15 Nov 2005 14:50:14 +0000 Subject: * lib/find.rb (Find::find): should not ignore symbolic links to non-existing files. [ruby-talk:165866] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/find.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/find.rb b/lib/find.rb index 52efde81f..0d22dd62d 100644 --- a/lib/find.rb +++ b/lib/find.rb @@ -36,8 +36,8 @@ module Find paths.collect!{|d| d.dup} while file = paths.shift catch(:prune) do - next unless File.exist? file yield file.dup.taint + next unless File.exist? file begin if File.lstat(file).directory? then d = Dir.open(file) @@ -57,7 +57,7 @@ module Find d.close end end - rescue Errno::ENOENT, Errno::EACCES + rescue Errno::ENOENT, Errno::EACCES end end end -- cgit