Skip to content

Commit

Permalink
fix: deb: remove / prefix from files
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Feb 25, 2018
1 parent e4f8dde commit 3fb90ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deb/deb.go
Expand Up @@ -119,7 +119,7 @@ func copyToTarAndDigest(tarw *tar.Writer, md5w io.Writer, now time.Time, src, ds
return 0, nil
}
var header = tar.Header{
Name: dst,
Name: dst[1:],
Size: info.Size(),
Mode: int64(info.Mode()),
ModTime: now,
Expand All @@ -132,7 +132,7 @@ func copyToTarAndDigest(tarw *tar.Writer, md5w io.Writer, now time.Time, src, ds
if _, err := io.Copy(tarw, io.TeeReader(file, digest)); err != nil {
return 0, errors.Wrap(err, "failed to copy")
}
if _, err := fmt.Fprintf(md5w, "%x %s\n", digest.Sum(nil), header.Name[1:]); err != nil {
if _, err := fmt.Fprintf(md5w, "%x %s\n", digest.Sum(nil), header.Name); err != nil {
return 0, errors.Wrap(err, "failed to write md5")
}
return info.Size(), nil
Expand Down

0 comments on commit 3fb90ad

Please sign in to comment.