summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-15 15:54:34 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-15 15:54:34 +0000
commit408ff3dd40e74ca4e883648dba06e7fdcdaca127 (patch)
treed6326702abf92dbd1ad91220ab1d935bcf17cc44 /lib
parent9b310e13fb6ee25b0d37f8d8cfc3ea7180392ec4 (diff)
downloadruby-408ff3dd40e74ca4e883648dba06e7fdcdaca127.tar.gz
ruby-408ff3dd40e74ca4e883648dba06e7fdcdaca127.tar.xz
ruby-408ff3dd40e74ca4e883648dba06e7fdcdaca127.zip
* lib/find.rb (Find.find): rescue more exceptions which is possible to
occur by other process change the directory tree. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/find.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/find.rb b/lib/find.rb
index c9fee921f..591020ea0 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -41,13 +41,13 @@ module Find
yield file.dup.taint
begin
s = File.lstat(file)
- rescue Errno::ENOENT, Errno::EACCES
+ rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
next
end
if s.directory? then
begin
fs = Dir.entries(file)
- rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR
+ rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
next
end
fs.sort!