Skip to content

Commit

Permalink
ignore sockets when adding to tar (GoogleContainerTools#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyawadhwa authored Aug 13, 2018
1 parent 93d139c commit 3a9b4fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/util/tar_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ func AddToTar(p string, i os.FileInfo, hardlinks map[uint64]string, w *tar.Write
return err
}
}
if i.Mode()&os.ModeSocket != 0 {
logrus.Infof("ignoring socket %s, not adding to tar", i.Name())
return nil
}
hdr, err := tar.FileInfoHeader(i, linkDst)
if err != nil {
return err
Expand Down

0 comments on commit 3a9b4fe

Please sign in to comment.