Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add defer authentication for zip entry #5

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.20.5"
go-version: "1.21"

- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
Expand All @@ -39,7 +39,7 @@ jobs:
[windows-latest, windows],
]
arch: [amd64]
go-version: ["1.20.5"]
go-version: ["1.21"]
runs-on: ${{ matrix.os[0] }}
name: Test (go${{ matrix.go-version }}, ${{ matrix.os[1] }}, ${{ matrix.arch }})
defaults:
Expand Down
2 changes: 2 additions & 0 deletions file.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ func unzipFile(ctx context.Context, filePath string, password string) error {
dstDirPath := filepath.Dir(dstPath)
_ = os.MkdirAll(dstDirPath, zipEntry.Mode())

zipEntry.DeferAuth = true

if len(password) > 0 {
zipEntry.SetPassword(password)
}
Expand Down
Loading