remove unnecessary filepath.Join since dest is always an absolute path
This commit is contained in:
parent
2cf6f52517
commit
edd873d1fe
|
|
@ -245,8 +245,8 @@ func extractFile(dest string, hdr *tar.Header, tr io.Reader) error {
|
|||
return errors.Wrapf(err, "error removing %s to make way for new link", hdr.Name)
|
||||
}
|
||||
}
|
||||
link := filepath.Join(dest, hdr.Linkname)
|
||||
if err := os.Link(filepath.Clean(filepath.Join("/", link)), path); err != nil {
|
||||
link := filepath.Clean(filepath.Join(dest, hdr.Linkname))
|
||||
if err := os.Link(link, path); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue