We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ea4287 commit ef53e8aCopy full SHA for ef53e8a
1 file changed
main.go
@@ -13,6 +13,7 @@ import (
13
"os"
14
"os/exec"
15
"sync"
16
+ "time"
17
18
"github.com/pkg/errors"
19
)
@@ -146,11 +147,16 @@ func (a *analyzer) storeError(err error) {
146
147
}
148
149
func (a *analyzer) writeFile(zf *zipFile) error {
- f, err := a.zipWriter.Create(zf.name)
150
+ header := &zip.FileHeader{
151
+ Name: zf.name,
152
+ Method: zip.Deflate,
153
+ Modified: time.Now(),
154
+ }
155
+ w, err := a.zipWriter.CreateHeader(header)
156
if err != nil {
157
return errors.Wrap(err, "error creating "+zf.name+" in zip file")
158
- _, err = f.Write(zf.contents)
159
+ _, err = w.Write(zf.contents)
160
161
return errors.Wrap(err, "error writing "+zf.name+" to zip file")
162
0 commit comments