lib/nanoc/data_sources/filesystem.rb in nanoc-2.1.2 vs lib/nanoc/data_sources/filesystem.rb in nanoc-2.1.3
- old
+ new
@@ -612,10 +612,10 @@
# '.bak')
def content_filename_for_dir(dir)
# Find all files
filename_glob_1 = dir.sub(/([^\/]+)$/, '\1/\1.*')
filename_glob_2 = dir.sub(/([^\/]+)$/, '\1/index.*')
- filenames = Dir[filename_glob_1] + Dir[filename_glob_2]
+ filenames = (Dir[filename_glob_1] + Dir[filename_glob_2]).uniq
# Reject meta files
filenames.reject! { |f| f =~ /\.yaml$/ }
# Reject backups