Normalize paths in the cleaning queue using realpath in order to avoid complicated symlink problems.

This commit is contained in:
Ben Hollis 2013-09-16 22:13:39 -07:00
parent e6d5c8e91b
commit 8a928863f2

View file

@ -236,7 +236,7 @@ module Middleman::Cli
@cleaning_queue = []
return unless File.exist?(@destination)
paths = ::Middleman::Util.all_files_under(@destination)
paths = ::Middleman::Util.all_files_under(@destination).map(&:realpath)
@cleaning_queue += paths.select do |path|
path.to_s !~ /\/\./ || path.to_s =~ /\.(htaccess|htpasswd)/
end