]> Cypherpunks repositories - gostls13.git/commit
archive/zip: avoid data descriptor when writing directories
authorAntonin Amand <antonin.amand@gmail.com>
Wed, 2 May 2018 10:07:56 +0000 (12:07 +0200)
committerJoe Tsai <thebrokentoaster@gmail.com>
Wed, 2 May 2018 23:34:50 +0000 (23:34 +0000)
commit7b451dc715a728ea03edf17fa497d8f72d32a03f
tree79c82fc6f57a81748734341865b2a939deb57d1f
parent8cd0094b4ee6b51c49f96de98308701108b45995
archive/zip: avoid data descriptor when writing directories

Java fails to unzip archives created by archive/zip because directories are
written with the "data descriptor" flag (bit 3) set, but emits no such
descriptor. To fix this, we explicitly clear the flag.

Fixes #25215

Change-Id: Id3af4c7f863758197063df879717c1710f86c0e5
Reviewed-on: https://go-review.googlesource.com/110795
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/archive/zip/writer.go
src/archive/zip/writer_test.go