Documentation
¶
Overview ¶
Package archivepath decides which names and symbolic-link targets of a tar archive may be written into one extraction tree.
Archive names are slash paths by the tar format, not host paths, so this package uses package path throughout.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckLink ¶
CheckLink reports whether a symbolic link at slash path name of an archive may carry target. The target is relative, resolves inside the archive root, and has no ".." after a name.
The last rule is what keeps the text of a target equal to where it resolves. A name in the target may itself be a link, and "z/.." then reaches a different directory than its text says: with z a link to ".", each "z/.." climbs one directory more than it reads, so a target that passes the lexical check can resolve above the root. A target that climbs only before it names anything resolves the same however the rest of the tree's links point, provided no entry's location passes through a link (the extraction in coding/extension/host/cellpack checks the tree on disk for that). A target holds no ":": on Windows "C:foo" is relative to the current folder of drive C, an absolute path that filepath.IsAbs does not report on other systems.
Types ¶
This section is empty.