]> Cypherpunks repositories - gostls13.git/commit
archive/zip: permit zip files to have prefixes
authorIan Lance Taylor <iant@golang.org>
Fri, 25 Feb 2022 03:23:17 +0000 (19:23 -0800)
committerGopher Robot <gobot@golang.org>
Sun, 8 May 2022 17:26:10 +0000 (17:26 +0000)
commitdf57592276bc26e2eb4e4ca5e77e4e2e422c7c6b
tree71c456238dac548cf14c986a487fcb9065dee841
parent507a44dc228a3817e7007f292a404fe6c9f66315
archive/zip: permit zip files to have prefixes

A Java jar file is a zip file, but it can have a prefix that is a bash
script that unpacks the zip file. Most zip programs ignore such prefixes.
This CL changes the archive/zip package to do the same.

Fixes #10464
Fixes #51337

Change-Id: I976e9c64684644317bd21077bc5b4a2baf626ee6
Reviewed-on: https://go-review.googlesource.com/c/go/+/387976
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Auto-Submit: Ian Lance Taylor <iant@google.com>
src/archive/zip/reader.go
src/archive/zip/reader_test.go
src/archive/zip/testdata/readme.notzip
src/archive/zip/testdata/test-prefix.zip [new file with mode: 0644]