Skip to content

Commit 7020af7

Browse files
committed
zip: Re-add zip64 fix
Accidentally reverted #313 in #432 Fixes #623
1 parent 352428d commit 7020af7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zip/writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func (w *Writer) Close() error {
125125
b.uint16(uint16(len(h.Comment)))
126126
b = b[4:] // skip disk number start and internal file attr (2x uint16)
127127
b.uint32(h.ExternalAttrs)
128-
if h.offset > uint32max {
128+
if h.isZip64() || h.offset > uint32max {
129129
b.uint32(uint32max)
130130
} else {
131131
b.uint32(uint32(h.offset))

0 commit comments

Comments
 (0)