diff --git a/pkg/utils/file/file.go b/pkg/utils/file/file.go index 7a1e83c67..e67a8e4f9 100644 --- a/pkg/utils/file/file.go +++ b/pkg/utils/file/file.go @@ -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,