diff --git a/internal/utils/zip.go b/internal/utils/zip.go index 37c6d4a4..8bbd644c 100644 --- a/internal/utils/zip.go +++ b/internal/utils/zip.go @@ -18,16 +18,6 @@ func Zip(source, zipPath string) error { archive := zip.NewWriter(archiveFile) defer archive.Close() - info, err := os.Stat(source) - if err != nil { - return nil - } - - var baseDir string - if info.IsDir() { - baseDir = filepath.Base(source) - } - return filepath.Walk(source, func(path string, info os.FileInfo, err error) error { if err != nil { return err @@ -42,9 +32,7 @@ func Zip(source, zipPath string) error { return err } - if baseDir != "" { - header.Name = filepath.Join(baseDir, strings.TrimPrefix(path, source)) - } + header.Name = strings.TrimPrefix(path, source) if info.IsDir() { header.Name += "/"