From 6f0f282b7ef4714ec1a4cea0c1d5403d5cb756a2 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Mon, 15 Jan 2024 14:15:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20zip=20=E5=8E=8B?= =?UTF-8?q?=E7=BC=A9=E5=89=8D=E5=90=8E=E5=A4=A7=E5=B0=8F=E4=B8=8D=E5=8F=98?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20(#3610)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/utils/files/file_op.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/utils/files/file_op.go b/backend/utils/files/file_op.go index 24a0910e5..15c282ed3 100644 --- a/backend/utils/files/file_op.go +++ b/backend/utils/files/file_op.go @@ -606,12 +606,12 @@ func ZipFile(files []archiver.File, dst afero.File) error { if err != nil { return err } + hdr.Method = zip.Deflate hdr.Name = file.NameInArchive if file.IsDir() { if !strings.HasSuffix(hdr.Name, "/") { hdr.Name += "/" } - hdr.Method = zip.Store } w, err := zw.CreateHeader(hdr) if err != nil {