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

@@ -79,16 +79,16 @@ func (d *Dumper) dumpNodeTar(ctx context.Context, node *restic.Node, w *tar.Writ
header.Mode |= cISVTX
}
if IsFile(node) {
if node.Type == restic.NodeTypeFile {
header.Typeflag = tar.TypeReg
}
if IsLink(node) {
if node.Type == restic.NodeTypeSymlink {
header.Typeflag = tar.TypeSymlink
header.Linkname = node.LinkTarget
}
if IsDir(node) {
if node.Type == restic.NodeTypeDir {
header.Typeflag = tar.TypeDir
header.Name += "/"
}