lib/nanoc/data_sources/filesystem/tools.rb in nanoc-4.12.12 vs lib/nanoc/data_sources/filesystem/tools.rb in nanoc-4.12.13
- old
+ new
@@ -109,12 +109,12 @@
extra_patterns =
case extra_files
when nil
[]
when String
- ["#{dir_name}/#{extra_files}"]
+ ["#{dir_name}/#{extra_files.dup.delete_prefix('/')}"]
when Array
- extra_files.map { |extra_file| "#{dir_name}/#{extra_file}" }
+ extra_files.map { |extra_file| "#{dir_name}/#{extra_file.dup.delete_prefix('/')}" }
else
raise(
Nanoc::Core::TrivialError,
"Do not know how to handle extra_files: #{extra_files.inspect}",
)