Move more things over to new configs. Don't let root be configured

This commit is contained in:
Ben Hollis 2012-10-13 22:37:24 -07:00
parent a50ca56fbc
commit 4fe22e3fb5
14 changed files with 42 additions and 39 deletions

View file

@ -62,7 +62,7 @@ module Middleman::CoreExtensions
def clear_data(file)
# Copied from Sitemap::Store#file_to_path, but without
# removing the file extension
file = File.expand_path(file, @app.root)
file = File.join(@app.root, file)
prefix = @app.source_dir.sub(/\/$/, "") + "/"
return unless file.include?(prefix)
path = file.sub(prefix, "")