add proper constants for node type

This commit is contained in:
Michael Eischer
2024-07-09 19:51:44 +02:00
parent 3b438e5c7c
commit ca1e5e10b6
42 changed files with 206 additions and 206 deletions

View File

@@ -40,7 +40,7 @@ func (d *Dumper) dumpNodeZip(ctx context.Context, node *restic.Node, zw *zip.Wri
}
header.SetMode(node.Mode)
if IsDir(node) {
if node.Type == restic.NodeTypeDir {
header.Name += "/"
}
@@ -49,7 +49,7 @@ func (d *Dumper) dumpNodeZip(ctx context.Context, node *restic.Node, zw *zip.Wri
return errors.Wrap(err, "ZipHeader")
}
if IsLink(node) {
if node.Type == restic.NodeTypeSymlink {
if _, err = w.Write([]byte(node.LinkTarget)); err != nil {
return errors.Wrap(err, "Write")
}