Merge pull request #27075 from tonistiigi/copy-error-reporting

Fix error reporting in `CopyFileWithTar`
This commit is contained in:
Brian Goff 2016-09-30 18:14:13 -04:00 committed by GitHub
commit 6de38ebc4d

View file

@ -1050,7 +1050,7 @@ func (archiver *Archiver) CopyFileWithTar(src, dst string) (err error) {
return nil
})
defer func() {
if er := <-errC; err != nil {
if er := <-errC; err == nil && er != nil {
err = er
}
}()