lib/rack/directory.rb in rack-2.1.2 vs lib/rack/directory.rb in rack-2.1.3

- old
+ new

@@ -104,16 +104,15 @@ "X-Cascade" => "pass" }, [body]] end def list_directory(path_info, path, script_name) files = [['../', 'Parent Directory', '', '', '']] - glob = ::File.join(path, '*') url_head = (script_name.split('/') + path_info.split('/')).map do |part| Rack::Utils.escape_path part end - Dir[glob].sort.each do |node| + Dir.entries(path).reject { |e| e.start_with?('.') }.sort.each do |node| stat = stat(node) next unless stat basename = ::File.basename(node) ext = ::File.extname(node)