dump/zip: only compress regular files
This commit is contained in:
parent
1a7fafc7eb
commit
da3c02405b
1 changed files with 3 additions and 1 deletions
|
@ -39,7 +39,9 @@ func (d *Dumper) dumpNodeZip(ctx context.Context, node *restic.Node, zw *zip.Wri
|
||||||
Modified: node.ModTime,
|
Modified: node.ModTime,
|
||||||
}
|
}
|
||||||
header.SetMode(node.Mode)
|
header.SetMode(node.Mode)
|
||||||
|
if node.Type == restic.NodeTypeFile {
|
||||||
header.Method = zip.Deflate
|
header.Method = zip.Deflate
|
||||||
|
}
|
||||||
|
|
||||||
if node.Type == restic.NodeTypeDir {
|
if node.Type == restic.NodeTypeDir {
|
||||||
header.Name += "/"
|
header.Name += "/"
|
||||||
|
|
Loading…
Reference in a new issue