Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #77 from Szymongib/to-slash-in-header
Browse files Browse the repository at this point in the history
Fix setting tar FileInfoHeader name
  • Loading branch information
weingart authored Aug 25, 2018
2 parents 089cf0d + 67cd4fd commit 601bd40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func tarFile(tarWriter *tar.Writer, source, dest string) error {
}

if baseDir != "" {
header.Name = filepath.Join(baseDir, strings.TrimPrefix(path, source))
header.Name = filepath.ToSlash(filepath.Join(baseDir, strings.TrimPrefix(path, source)))
}

if header.Name == dest {
Expand Down

0 comments on commit 601bd40

Please # to comment.