summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--lib/find.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 45939b657..9e7201e38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Dec 15 09:06:33 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/find.rb (Find.find): get rid of race condition.
+
Mon Dec 14 22:33:21 2009 Tanaka Akira <akr@fsij.org>
* lib/find.rb (Find.find): rescue only ENOENT and EACCES for lstat.
diff --git a/lib/find.rb b/lib/find.rb
index 2b2864cb3..c9fee921f 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -47,7 +47,7 @@ module Find
if s.directory? then
begin
fs = Dir.entries(file)
- rescue Errno::ENOENT, Errno::EACCES
+ rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR
next
end
fs.sort!