Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix actual zipping of epub

  • Loading branch information...
commit 479632b23946727c0fb344f6c8a06c65148a270e 1 parent 034b880
@schacon authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/eeepub/ocf.rb
View
6 lib/eeepub/ocf.rb
@@ -97,7 +97,7 @@ def save(output_path)
if File.directory?(path)
zip.add_dir(path)
else
- zip.add_file(path)
+ zip.add_file(path, path)
end
end
end
@@ -112,9 +112,9 @@ def render
buffer = Zip::Archive.open_buffer(Zip::CREATE) do |zip|
Dir.glob('**/*').each do |path|
if File.directory?(path)
- zip.add_buffer(path, path)
+ zip.add_dir(path)
else
- zip.add_buffer(path, File.read(path))
+ zip.add_file(path, path)
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.