Skip to content

Commit

Permalink
Fixed compression error (IceWhaleTech#1097)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong authored May 19, 2023
1 parent 280ad4f commit 2fefee8
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 2fefee8

Please sign in to comment.