Skip to content

Commit

Permalink
Fixed compression error
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong committed May 15, 2023
1 parent 538639b commit a106abc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/utils/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,9 @@ func AddFile(ar archiver.Writer, path, commonPath string) error {
defer file.Close()

if path != commonPath {
filename := info.Name()
//filename := info.Name()
filename := strings.TrimPrefix(path, commonPath)
filename = strings.TrimPrefix(filename, string(filepath.Separator))
err = ar.Write(archiver.File{
FileInfo: archiver.FileInfo{
FileInfo: info,
Expand Down

0 comments on commit a106abc

Please sign in to comment.