]> Cypherpunks repositories - gostls13.git/commit
archive/zip: reject non-regular files in AddFS
authorMauri de Souza Meneguzzo <mauri870@gmail.com>
Thu, 7 Sep 2023 21:34:01 +0000 (21:34 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 15 Sep 2023 19:04:06 +0000 (19:04 +0000)
commit52fc777dcc342c000ac71d4da19047a2e02c27cb
tree328ffa02772edcbd73650aaec9fc450168a70437
parent6192f4615514a7673fb2318ce3491e162d74d438
archive/zip: reject non-regular files in AddFS

When a filesystem with non-regular files is used
the resulting files inside the zip archive are empty.

In this case we can be explicit and return an error.

Fixes #61875

Change-Id: I1aeac544521002e0c4bad328e73f51852ad4eee3
GitHub-Last-Rev: 5e53dcfd7c12e45d4142016d0b9b286f9aa83d56
GitHub-Pull-Request: golang/go#61876
Reviewed-on: https://go-review.googlesource.com/c/go/+/517475
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Mauri de Souza Meneguzzo <mauri870@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/archive/zip/writer.go
src/archive/zip/writer_test.go