Fix usage of a 1.9-only method in Sitemap::Page

This commit is contained in:
Ben Hollis 2012-03-11 23:40:50 -07:00
parent 54b5304264
commit de92015085

View file

@ -171,7 +171,8 @@ module Middleman::Sitemap
# (e.g., if the page is named 'gallery.html' and a path exists named 'gallery/', this would return true)
# @return [Boolean]
def eponymous_directory?
!!Dir.exists?(File.join(app.source_dir, eponymous_directory_path))
full_path = File.join(app.source_dir, eponymous_directory_path)
!!(File.exists?(full_path) && File.directory?(full_path))
end
# The path for this page if it were a directory, and not a file