Permalink
Browse files

write the entries of the zip file only if it is a file

  • Loading branch information...
1 parent d338f30 commit a82f2a2eb8f57a389c888f10d933ced0933d7fba Michael Stämpfli committed Apr 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/docx_manipulator.rb
View
@@ -33,7 +33,7 @@ def process
Zip::ZipOutputStream.open(target) do |os|
Zip::ZipFile.foreach(source) do |entry|
- unless files_to_be_written.include?(entry.name)
+ if !files_to_be_written.include?(entry.name) && entry.file?
os.put_next_entry entry.name
os.write entry.get_input_stream.read
end

0 comments on commit a82f2a2

Please sign in to comment.