diff options
Diffstat (limited to 'lib/find.rb')
-rw-r--r-- | lib/find.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/find.rb b/lib/find.rb index 9ca39cabcb..52efde81fd 100644 --- a/lib/find.rb +++ b/lib/find.rb @@ -36,7 +36,8 @@ module Find paths.collect!{|d| d.dup} while file = paths.shift catch(:prune) do - yield file + next unless File.exist? file + yield file.dup.taint begin if File.lstat(file).directory? then d = Dir.open(file) @@ -50,7 +51,7 @@ module Find else f = File.join(file, f) end - paths.unshift f + paths.unshift f.untaint end ensure d.close |