From 7020af7b334a64feaaa51cf285e93d7d09b9acba Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Thu, 9 Jun 2022 14:55:27 +0200 Subject: [PATCH] zip: Re-add zip64 fix 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))