mirror of
https://github.com/restic/restic.git
synced 2025-12-12 03:11:56 +00:00
add proper constants for node type
This commit is contained in:
@@ -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 += "/"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user