lib/middleman-tansu/drawer.rb in middleman-tansu-0.0.3 vs lib/middleman-tansu/drawer.rb in middleman-tansu-0.0.4

- old
+ new

@@ -4,14 +4,14 @@ def initialize(app, options, exclude_path = []) @config = app.config @options = options @dirs = ["/"] @exclude_path = exclude(exclude_path) - search_directory(@config.source) end def empty - empty = [] + search_directory(@config.source) + empty = [] @dirs.each do |dir| glob_path = File.join(@config.source, dir, "#{@config.tansu[:default_document].strip}*") if Dir.glob(glob_path).length == 0 empty.push(dir) end