Fix all_files_under - not all non-files are directories

This commit is contained in:
Ben Hollis 2012-07-08 18:35:50 -07:00
parent 6dad42bc77
commit d05f968feb

View file

@ -84,7 +84,7 @@ module Middleman
paths.flatten! paths.flatten!
paths.map! { |p| Pathname(p) } paths.map! { |p| Pathname(p) }
files = paths.select { |p| p.file? } files = paths.select { |p| p.file? }
(paths - files).each do |dir| paths.select {|p| p.directory? }.each do |dir|
files << all_files_under(dir.children) files << all_files_under(dir.children)
end end
files.flatten files.flatten