2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-23 13:17:42 +00:00

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)
if node.Type == restic.NodeTypeFile {
header.Method = zip.Deflate
}
if node.Type == restic.NodeTypeDir {
header.Name += "/"