Skip to content

Commit

Permalink
support both hard and soft links
Browse files Browse the repository at this point in the history
  • Loading branch information
shizhMSFT committed Apr 11, 2019
1 parent fbdb619 commit 7909ccb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/content/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ func extractTarDirectory(root, prefix string, r io.Reader) error {
case tar.TypeDir:
err = os.MkdirAll(path, header.FileInfo().Mode())
case tar.TypeLink:
err = os.Link(header.Linkname, path)
case tar.TypeSymlink:
err = os.Symlink(header.Linkname, path)
default:
continue // Non-regular files are skipped
Expand Down

0 comments on commit 7909ccb

Please sign in to comment.