* 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
@ -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>
|
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>
|
Mon Dec 14 22:33:21 2009 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
@ -41,13 +41,13 @@ module Find
|
|||||||
yield file.dup.taint
|
yield file.dup.taint
|
||||||
begin
|
begin
|
||||||
s = File.lstat(file)
|
s = File.lstat(file)
|
||||||
rescue Errno::ENOENT, Errno::EACCES
|
rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
if s.directory? then
|
if s.directory? then
|
||||||
begin
|
begin
|
||||||
fs = Dir.entries(file)
|
fs = Dir.entries(file)
|
||||||
rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR
|
rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
fs.sort!
|
fs.sort!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user