[MM-55051] Assign correct timestamp to support packet files (#25035)

* Assign correct timestamp to support packet files

* Fix linter error

* Add back compression

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Ben Schumacher
2023-11-03 09:48:18 +01:00
коммит произвёл GitHub
родитель e8569c91af
Коммит 43f4734eae
3 изменённых файлов: 54 добавлений и 11 удалений

Просмотреть файл

@@ -1385,7 +1385,12 @@ func (a *App) CreateZipFileAndAddFiles(fileBackend filestore.FileBackend, fileDa
func populateZipfile(w *zip.Writer, fileDatas []model.FileData) error {
defer w.Close()
for _, fd := range fileDatas {
f, err := w.Create(fd.Filename)
f, err := w.CreateHeader(&zip.FileHeader{
Name: fd.Filename,
Method: zip.Deflate,
Modified: time.Now(),
})
if err != nil {
return err
}