summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/find.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/find.rb b/lib/find.rb
index ee96e526e..f9bc75415 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -39,9 +39,13 @@ module Find
while file = paths.shift
catch(:prune) do
yield file.dup.taint
- next unless File.exist? file
+ begin
+ s = File.lstat(file)
+ rescue SystemCallError
+ next
+ end
begin
- if File.lstat(file).directory? then
+ if s.directory? then
d = Dir.open(file)
begin
for f in d