Fixes #150. Strip leading path before checking for excluded file.

This commit is contained in:
Chris Sims 2011-09-17 18:34:09 -05:00
parent 728bdad5ca
commit 1a562b9580

View File

@ -209,7 +209,7 @@ desc "copy dot files for deployment"
task :copydot do task :copydot do
exclusions = [".", "..", ".DS_Store"] exclusions = [".", "..", ".DS_Store"]
Dir["#{source_dir}/**/.*"].each do |file| Dir["#{source_dir}/**/.*"].each do |file|
if !File.directory?(file) && !exclusions.include?(file) if !File.directory?(file) && !exclusions.include?(File.basename(file))
cp(file, file.gsub(/#{source_dir}/, "#{public_dir}")); cp(file, file.gsub(/#{source_dir}/, "#{public_dir}"));
end end
end end