Skip to content

Commit

Permalink
Only make hardlinks prefixed
Browse files Browse the repository at this point in the history
we don't need to worry about prefixing synlinks. Infact, we probably don't want that at all. symlinks can point to files that don't exist, and probably want to be more flexible for things like relative links anyway.
  • Loading branch information
jspc committed Mar 6, 2022
1 parent 72effc7 commit d3602cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion os.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,11 @@ func decompressLoop(tr *tar.Reader, dest string) (err error) {
// see comment for the tar.TypeLink case above;
os.Remove(target)

err = os.Symlink(filepath.Join(dest, header.Linkname), target)
// we don't need to worry about prefixing synlinks. Infact,
// we probably don't want that at all. symlinks can point to
// files that don't exist, and probably want to be more flexible
// for things like relative links anyway
err = os.Symlink(header.Linkname, target)
if err != nil {
return
}
Expand Down

0 comments on commit d3602cf

Please sign in to comment.