aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/find.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/find.rb b/lib/find.rb
index 04c95601ff..f97cc1b836 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -55,14 +55,13 @@ module Find
end
if s.directory? then
begin
- fs = Dir.entries(file, encoding: enc)
+ fs = Dir.children(file, encoding: enc)
rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
raise unless ignore_error
next
end
fs.sort!
fs.reverse_each {|f|
- next if f == "." or f == ".."
f = File.join(file, f)
ps.unshift f.untaint
}