Skip to content

Commit

Permalink
Set Modified instead of calling SetModTime
Browse files Browse the repository at this point in the history
  • Loading branch information
bancek committed May 21, 2024
1 parent 1ca444a commit 9413cfc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions zipstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,12 @@ func (z *ZipStream) add(reader io.Reader, size int64, name string, mtime time.Ti

header := &zip.FileHeader{
Name: name,
Method: zip.Store,
CreatorVersion: 0x0300, // unix
Flags: 0x800, // utf8
Method: zip.Store,
Modified: mtime,
}

header.SetModTime(mtime)

if isDir {
header.SetMode(0755)
} else {
Expand Down

0 comments on commit 9413cfc

Please sign in to comment.