Use mholt/archives instead of mholt/archiver (#3128)

* Use mholt/archives instead of mholt/archiver
* Fix validations
* Fix iszip function
* Fix directory
* Add better path sanitization
* ensure safe dir is passed
* Fix file permissions
* Fix config path
* Sanitize builder source path

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2025-01-08 11:00:54 +05:30
committed by GitHub
parent 54b67b5171
commit 4bce904c96
12 changed files with 721 additions and 155 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ func (opts *DumpSubCommand) do(input cli.Input) error {
if !nozip {
defer os.RemoveAll(tempDir)
path := filepath.Join(outputDir, fmt.Sprintf("%v.zip", dumpName))
_, err := utils.MakeZipArchive(path, tempDir)
_, err := utils.MakeZipArchiveWithGlobs(input.Context(), path, tempDir)
if err != nil {
fmt.Printf("Error creating archive for dump files: %v", err)
return err