Skip to content

Commit 7909ccb

Browse files
committed
support both hard and soft links
1 parent fbdb619 commit 7909ccb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pkg/content/utils.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ func extractTarDirectory(root, prefix string, r io.Reader) error {
109109
case tar.TypeDir:
110110
err = os.MkdirAll(path, header.FileInfo().Mode())
111111
case tar.TypeLink:
112+
err = os.Link(header.Linkname, path)
113+
case tar.TypeSymlink:
112114
err = os.Symlink(header.Linkname, path)
113115
default:
114116
continue // Non-regular files are skipped

0 commit comments

Comments
 (0)