lib/sitemap/generator.rb in sitemap-0.3 vs lib/sitemap/generator.rb in sitemap-0.3.1
- old
+ new
@@ -149,14 +149,16 @@
root = File.join(Pathname.new(location).dirname, "sitemaps")
Dir.mkdir(root) unless File.directory?(root)
fragments.each_with_index do |fragment, i|
file_pattern = File.join(root, "sitemap-fragment-#{i + 1}.xml")
FileUtils.mv(fragment.path, file_pattern)
+ File.chmod(0755, file_pattern)
end
file = File.new(location, "w")
file.write(render "index")
file.close
end
+ File.chmod(0755, location)
end
# URL to the sitemap file.
#
# Defaults to <tt>sitemap.xml</tt>.