Skip to content

Commit 700715b

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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

zip.go

+2
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)