Skip to content

Commit 77403a8

Browse files
committed
Improve rollback comment
1 parent 87f1ceb commit 77403a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/zip_kit/streamer.rb

+4
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,10 @@ def update_last_entry_and_write_data_descriptor(crc32:, compressed_size:, uncomp
486486
# is likely already on the wire. However, excluding the entry from the central directory of the ZIP
487487
# file will allow better-behaved ZIP unarchivers to extract the entries which did store correctly,
488488
# provided they read the ZIP from the central directory and not straight-ahead.
489+
# Rolling back does not perform any writes.
490+
#
491+
# `rollback!` gets called for you if an exception is raised inside the block of `write_file`,
492+
# `write_deflated_file` and `write_stored_file`.
489493
#
490494
# @example
491495
# zip.add_stored_entry(filename: "data.bin", size: 4.megabytes, crc32: the_crc)

0 commit comments

Comments
 (0)