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>