Make an effort to handle spaces in filenames in a way that url_for can handle.

This commit is contained in:
Ben Hollis 2013-08-15 21:12:29 -07:00
parent dcd760d4f8
commit 268538f926
4 changed files with 4 additions and 3 deletions

View file

@ -119,7 +119,7 @@ module Middleman::Cli
# @return [String] The full path of the file that was written
def render_to_file(resource)
build_dir = self.class.shared_instance.config[:build_dir]
output_file = File.join(build_dir, resource.destination_path)
output_file = File.join(build_dir, resource.destination_path.gsub('%20', ' '))
if resource.binary?
if !File.exists?(output_file)