fix: issue creating archive that was a directory
This commit is contained in:
parent
920703fc0e
commit
fe67674829
1 changed files with 5 additions and 0 deletions
|
|
@ -135,6 +135,11 @@ func addToArchive(tw *tar.Writer, filename string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// skip file if it's a directory
|
||||
if info.IsDir() {
|
||||
return nil
|
||||
}
|
||||
|
||||
// create a tar Header from the FileInfo data
|
||||
header, err := tar.FileInfoHeader(info, info.Name())
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue