From 999ca1093d2eb85f9c4129f9b6342175557c2a10 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Thu, 9 Jun 2022 06:17:44 -0700 Subject: [PATCH] zip: Re-add zip64 fix (#624) Accidentally reverted #313 in #432 Fixes #623 --- zip/writer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zip/writer.go b/zip/writer.go index 05a4acc00b..0eb0378246 100644 --- a/zip/writer.go +++ b/zip/writer.go @@ -125,7 +125,7 @@ func (w *Writer) Close() error { b.uint16(uint16(len(h.Comment))) b = b[4:] // skip disk number start and internal file attr (2x uint16) b.uint32(h.ExternalAttrs) - if h.offset > uint32max { + if h.isZip64() || h.offset > uint32max { b.uint32(uint32max) } else { b.uint32(uint32(h.offset))