From 7959ee0ede0c149a8bf80f23a41fe882376811b7 Mon Sep 17 00:00:00 2001 From: Petr Ilin Date: Wed, 21 Aug 2024 23:06:49 +0300 Subject: [PATCH] zip: Fix compression method not set without SelectiveCompression enabled --- zip.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zip.go b/zip.go index 7d11ea4d..0a4d04a8 100644 --- a/zip.go +++ b/zip.go @@ -157,6 +157,8 @@ func (z Zip) archiveOneFile(ctx context.Context, zw *zip.Writer, idx int, file F } else { hdr.Method = z.Compression } + } else { + hdr.Method = z.Compression } w, err := zw.CreateHeader(hdr)