dump/zip: only compress regular files

This commit is contained in:
Michael Eischer 2024-10-16 21:09:05 +02:00
parent 1a7fafc7eb
commit da3c02405b

View file

@ -39,7 +39,9 @@ func (d *Dumper) dumpNodeZip(ctx context.Context, node *restic.Node, zw *zip.Wri
Modified: node.ModTime,
}
header.SetMode(node.Mode)
header.Method = zip.Deflate
if node.Type == restic.NodeTypeFile {
header.Method = zip.Deflate
}
if node.Type == restic.NodeTypeDir {
header.Name += "/"