Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 700715b

Browse files
authored
zip: Fix compression method not set without SelectiveCompression enabled (#419)
1 parent 743ede3 commit 700715b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

zip.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ func (z Zip) archiveOneFile(ctx context.Context, zw *zip.Writer, idx int, file F
157157
} else {
158158
hdr.Method = z.Compression
159159
}
160+
} else {
161+
hdr.Method = z.Compression
160162
}
161163

162164
w, err := zw.CreateHeader(hdr)

0 commit comments

Comments
 (0)