lib/nanoc/data_sources/filesystem.rb in nanoc-4.0.0b2 vs lib/nanoc/data_sources/filesystem.rb in nanoc-4.0.0b3

- old
+ new

@@ -1,7 +1,5 @@ -# encoding: utf-8 - module Nanoc::DataSources # Provides functionality common across all filesystem data sources. # # @api private module Filesystem @@ -44,9 +42,11 @@ # metadata section. # # @see Nanoc::DataSources::Filesystem#load_objects def load_objects(dir_name, kind, klass) res = [] + + return [] if dir_name.nil? all_split_files_in(dir_name).each do |base_filename, (meta_ext, content_exts)| content_exts.each do |content_ext| # Get filenames meta_filename = filename_for(base_filename, meta_ext)