aboutsummaryrefslogtreecommitdiffstats
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
commit9ab779aad1484a25ab1b9b0d16b35ff8064a7f53 (patch)
treed6326702abf92dbd1ad91220ab1d935bcf17cc44
parentd698bd8ad04fb7a56a777e8494ed9eb76a1c7ddf (diff)
downloadruby-9ab779aad1484a25ab1b9b0d16b35ff8064a7f53.tar.gz
* lib/find.rb (Find.find): rescue more exceptions which is possible to
occur by other process change the directory tree. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--lib/find.rb4
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e7201e387..03554b46f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
+Wed Dec 16 00:53:14 2009 Tanaka Akira <akr@fsij.org>
+
+ * lib/find.rb (Find.find): rescue more exceptions which is possible to
+ occur by other process change the directory tree.
+
Tue Dec 15 09:06:33 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/find.rb (Find.find): get rid of race condition.
+ * lib/find.rb (Find.find): get rid of race condition.
Mon Dec 14 22:33:21 2009 Tanaka Akira <akr@fsij.org>
diff --git a/lib/find.rb b/lib/find.rb
index c9fee921f8..591020ea04 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!