Skip to content

Commit

Permalink
fix: cbz packer
Browse files Browse the repository at this point in the history
  • Loading branch information
metafates committed Jun 18, 2022
1 parent 7e6d726 commit 7fa875f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packer.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ func PackToZip(images []string, destination string, withExtension bool) (string,
if withExtension {
destination += ".zip"
}

if exists, err := Afero.Exists(filepath.Dir(destination)); err != nil {
return "", err
} else if !exists {
if err := Afero.MkdirAll(filepath.Dir(destination), 0777); err != nil {
return "", err
}
}

zipFile, err := Afero.Create(destination)
if err != nil {
return "", err
Expand Down

0 comments on commit 7fa875f

Please sign in to comment.