Skip to content

Commit

Permalink
Use header name from slug in error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanuber committed Jun 9, 2020
1 parent 02b3564 commit dbc66eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slug.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,13 @@ func Unpack(r io.Reader, dst string) error {
target := filepath.Join(dir, header.Linkname)
if !strings.HasPrefix(target, dst) {
return fmt.Errorf("Invalid symlink (%q -> %q) has external target",
path, header.Linkname)
header.Name, header.Linkname)
}

// Create the symlink.
if err := os.Symlink(header.Linkname, path); err != nil {
return fmt.Errorf("Failed creating symlink (%q -> %q): %v",
path, header.Linkname, err)
header.Name, header.Linkname, err)
}

continue
Expand Down

0 comments on commit dbc66eb

Please sign in to comment.