sandrods / odf-report

Generates ODF files, given a template (.odt) and data, replacing tags

Home Page:http://sandrods.github.com/odf-report

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with replacing images on Windows

MatthiasWeise opened this issue · comments

Replacing images failed on Windows due to an issue with zipping files (see: http://stackoverflow.com/questions/10564283/why-are-binary-files-corrupted-when-zipping-them).
To fix this: change the following line of code in images.rb
from
file.output_stream.write ::File.read(path)
to
file.output_stream.write ::File.binread(path)

This solved the issue for me. I havn't yet time double check on Linux whether everything is still correct there.

Was not able to reproduce. It might have been an rubyzip issue. Working allright now