aboutsummaryrefslogtreecommitdiff
path: root/src/archive/zip/writer.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive/zip/writer.go')
-rw-r--r--src/archive/zip/writer.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/archive/zip/writer.go b/src/archive/zip/writer.go
index ea4559e698..8940e25560 100644
--- a/src/archive/zip/writer.go
+++ b/src/archive/zip/writer.go
@@ -103,18 +103,6 @@ func (w *Writer) Close() error {
b.uint32(h.UncompressedSize)
}
- // use Extended Timestamp Extra Field.
- if h.ModifiedTime != 0 || h.ModifiedDate != 0 {
- mt := uint32(h.ModTime().Unix())
- var mbuf [9]byte // 2x uint16 + uint8 + uint32
- eb := writeBuf(mbuf[:])
- eb.uint16(exttsExtraId)
- eb.uint16(5) // size = uint8 + uint32
- eb.uint8(1) // flags = modtime
- eb.uint32(mt) // ModTime
- h.Extra = append(h.Extra, mbuf[:]...)
- }
-
b.uint16(uint16(len(h.Name)))
b.uint16(uint16(len(h.Extra)))
b.uint16(uint16(len(h.Comment)))
@@ -397,11 +385,6 @@ func (w nopCloser) Close() error {
type writeBuf []byte
-func (b *writeBuf) uint8(v uint8) {
- (*b)[0] = v
- *b = (*b)[1:]
-}
-
func (b *writeBuf) uint16(v uint16) {
binary.LittleEndian.PutUint16(*b, v)
*b = (*b)[2:]