diff options
Diffstat (limited to 'libgo/go/archive/tar/common.go')
-rw-r--r-- | libgo/go/archive/tar/common.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libgo/go/archive/tar/common.go b/libgo/go/archive/tar/common.go index c31df06..36f4e23 100644 --- a/libgo/go/archive/tar/common.go +++ b/libgo/go/archive/tar/common.go @@ -327,3 +327,14 @@ func toASCII(s string) string { } return buf.String() } + +// isHeaderOnlyType checks if the given type flag is of the type that has no +// data section even if a size is specified. +func isHeaderOnlyType(flag byte) bool { + switch flag { + case TypeLink, TypeSymlink, TypeChar, TypeBlock, TypeDir, TypeFifo: + return true + default: + return false + } +} |