From 513e6dc2ad7cd5492904660907b893b25edc995d Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Tue, 30 Apr 2013 19:52:33 -0700 Subject: [PATCH] Attempt a fix for #837 --- .../lib/middleman-core/sitemap/extensions/traversal.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/middleman-core/lib/middleman-core/sitemap/extensions/traversal.rb b/middleman-core/lib/middleman-core/sitemap/extensions/traversal.rb index bc62a4a8..2eb92649 100644 --- a/middleman-core/lib/middleman-core/sitemap/extensions/traversal.rb +++ b/middleman-core/lib/middleman-core/sitemap/extensions/traversal.rb @@ -68,6 +68,9 @@ module Middleman # (e.g., if the resource is named 'gallery.html' and a path exists named 'gallery/', this would return true) # @return [Boolean] def eponymous_directory? + if !path.end_with?("/#{app.index_file}") && destination_path.end_with?("/#{app.index_file}") + return true + end full_path = File.join(app.source_dir, eponymous_directory_path) !!(File.exists?(full_path) && File.directory?(full_path)) end