]> Cypherpunks repositories - gostls13.git/commit
archive/zip: use Modified in FileHeader.FileInfo
authorJannis Andrija Schnitzer <jannis@schnitzer.im>
Mon, 8 Apr 2019 07:31:59 +0000 (07:31 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 8 Apr 2019 07:55:52 +0000 (07:55 +0000)
commit20995f627422a3dce2039f06b5dfe1dc0ca174c6
tree3892a70792ee5ecfffa47d923eeee05d8b9e9dbf
parent9017b6149e0fcac8b60e5b755cddb98ea37daaf9
archive/zip: use Modified in FileHeader.FileInfo

The Modified field allows representation of extended timestamps, which provide more accuracy than the legacy MS-DOS timestamps.
The FileInfo method provides an implementation of the os.FileInfo interface for files inside archives.

With this change, we make FileInfo use the Modified field, if present, to return more detailed timestamps from its ModTime method.

Fixes #28350

Change-Id: Ia31b5b871a3e61df38a3a1325787ae23ea0b8088
GitHub-Last-Rev: 13e94be3f8ba58717911354146670fc2bc594692
GitHub-Pull-Request: golang/go#28352
Reviewed-on: https://go-review.googlesource.com/c/go/+/144382
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
src/archive/zip/struct.go
src/archive/zip/zip_test.go