mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
d698bd8ad0
commit
9ab779aad1
2 changed files with 8 additions and 3 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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!
|
||||
|
|
Loading…
Add table
Reference in a new issue