lib/massive_sitemap/writer/file.rb in massive_sitemap-2.0.0.rc1 vs lib/massive_sitemap/writer/file.rb in massive_sitemap-2.0.0.rc2

- old
+ new

@@ -7,17 +7,19 @@ module Writer class File < Base class FileExistsException < IOError; end - OPTS = { + OPTS = Base::OPTS.merge( :document_full => '.', :force_overwrite => false, :filename => "sitemap.xml", :index_filename => "sitemap_index.xml", - } + ) def open_stream + dir = ::File.dirname(tmp_filename) + Dir.mkdir(dir) unless ::File.exists?(dir) ::File.open(tmp_filename, 'w:ASCII-8BIT') end def close_stream(stream) stream.close