Skip to content

Commit

Permalink
Merge pull request #70 from nabbar/fix_archive_link
Browse files Browse the repository at this point in the history
pkg archive - creation link - invert order src/dst
  • Loading branch information
Nicolas JUHEL authored Oct 12, 2020
2 parents 0672878 + 8bd2118 commit 26a2e81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions archive/tar/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ func writeContent(r io.Reader, h *tar.Header, out string, defaultDirPerm os.File
} else if err = notDirExistCannotClean(out); err != nil {
return
} else if h.Typeflag&tar.TypeLink == tar.TypeLink {
e := os.Link(out, h.Linkname)
e := os.Link(h.Linkname, out)
if e != nil {
err = ErrorLinkCreate.ErrorParent(e)
}
return
} else if h.Typeflag&tar.TypeSymlink == tar.TypeSymlink {
e := os.Symlink(out, h.Linkname)
e := os.Symlink(h.Linkname, out)
if e != nil {
err = ErrorSymLinkCreate.ErrorParent(e)
}
Expand Down

0 comments on commit 26a2e81

Please sign in to comment.