From fd926b183decaa47130d3dbd307d04710af6aa3e Mon Sep 17 00:00:00 2001 From: Daniel Bayerlein Date: Sun, 13 Jan 2013 19:41:58 +0100 Subject: [PATCH] [deploy_ftp] Add support for hidden files. --- lib/middleman-deploy/commands.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/middleman-deploy/commands.rb b/lib/middleman-deploy/commands.rb index c02c574..0b0deed 100644 --- a/lib/middleman-deploy/commands.rb +++ b/lib/middleman-deploy/commands.rb @@ -177,7 +177,8 @@ EOF ftp.passive = true Dir.chdir('build/') do - Dir['**/*'].each do |f| + files = Dir.glob('**/*', File::FNM_DOTMATCH) + files.reject { |a| a =~ Regexp.new('\.$') }.each do |f| if File.directory?(f) begin ftp.mkdir(f)