]> Cypherpunks repositories - gostls13.git/commit
archive/zip: only use Extended Timestamp on non-zero MS-DOS timestamps
authorJoe Tsai <joetsai@digital-static.net>
Tue, 11 Oct 2016 01:23:56 +0000 (18:23 -0700)
committerJoe Tsai <thebrokentoaster@gmail.com>
Tue, 11 Oct 2016 21:31:25 +0000 (21:31 +0000)
commit35220534d5edbbbcd0eed59133bcfae54d140287
tree13d0409357d2c49e105f38abdb9eae25fa34531d
parent303b69feb7b26b583b53a3a82d824088064bbf2b
archive/zip: only use Extended Timestamp on non-zero MS-DOS timestamps

We should preserve the fact that a roundtrip read on fields with the zero
value should remain the zero for those that are reasonable to stay that way.
If the zero value for a MS-DOS timestamp was used, then it is sensible for
that zero value to also be read back later.

Fixes #17403

Change-Id: I32c3915eab180e91ddd2499007374f7b85f0bd76
Reviewed-on: https://go-review.googlesource.com/30811
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/archive/zip/struct.go
src/archive/zip/writer.go
src/archive/zip/zip_test.go