Skip to content

Commit

Permalink
Write the OpenOffice content file in one call.
Browse files Browse the repository at this point in the history
  • Loading branch information
Empact committed Nov 24, 2014
1 parent 3169a0e commit fc7d2f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/roo/open_office.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ def extract_content(tmpdir, filename)
def process_zipfile(tmpdir, zip, path='')
if zip.file.file? path
if path == "content.xml"
open(File.join(tmpdir, 'roo_content.xml'),'wb') {|f|
f << zip.read(path)
}
File.write(File.join(tmpdir, 'roo_content.xml'), zip.read(path), mode: 'wb')
end
else
unless path.empty?
Expand Down

0 comments on commit fc7d2f2

Please sign in to comment.