From 25837c2b61c7053e1b541fc69bbd2fa5dadbe11c Mon Sep 17 00:00:00 2001 From: sunyihoo Date: Fri, 17 May 2024 16:33:41 +0800 Subject: [PATCH 1/2] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f4fdcde..b62264c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ This fork add support for Standard Zip Encryption. +The work is based on https://github.com/yeka/zip The work is based on https://github.com/alexmullins/zip Available encryption: From db4e722c7541d594c54a745c8d8a317134996595 Mon Sep 17 00:00:00 2001 From: sunyihoo Date: Fri, 17 May 2024 16:36:01 +0800 Subject: [PATCH 2/2] fix: utf-8 flags Support UTF8 file names --- writer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/writer.go b/writer.go index 705215b..d73b6fe 100644 --- a/writer.go +++ b/writer.go @@ -210,7 +210,7 @@ func (w *Writer) CreateHeader(fh *FileHeader) (io.Writer, error) { return nil, errors.New("archive/zip: invalid duplicate FileHeader") } - fh.Flags |= 0x8 // we will write a data descriptor + fh.Flags |= 0x800 // we will write a data descriptor // TODO(alex): Look at spec and see if these need to be changed // when using encryption. fh.CreatorVersion = fh.CreatorVersion&0xff00 | zipVersion20 // preserve compatibility byte