From 0d9340f2236f54a89e795569f19bb6d6468eed81 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 15 Dec 2009 00:06:36 +0000 Subject: [PATCH] * lib/find.rb (Find.find): get rid of race condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/find.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 45939b6570..9e7201e387 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Dec 15 09:06:33 2009 Nobuyoshi Nakada + + * lib/find.rb (Find.find): get rid of race condition. + Mon Dec 14 22:33:21 2009 Tanaka Akira * lib/find.rb (Find.find): rescue only ENOENT and EACCES for lstat. diff --git a/lib/find.rb b/lib/find.rb index 2b2864cb34..c9fee921f8 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!