diff options
-rw-r--r-- | vendor.conf | 2 | ||||
-rw-r--r-- | vendor/github.com/containers/image/copy/copy.go | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/vendor.conf b/vendor.conf index c21cb4b8e..1c9bc1384 100644 --- a/vendor.conf +++ b/vendor.conf @@ -10,7 +10,7 @@ github.com/containerd/cgroups 58556f5ad8448d99a6f7bea69ea4bdb7747cfeb0 github.com/containerd/continuity master github.com/containernetworking/cni v0.7.0-alpha1 github.com/containernetworking/plugins 1562a1e60ed101aacc5e08ed9dbeba8e9f3d4ec1 -github.com/containers/image d8b5cf2b804a48489e5203d51254ef576794049d +github.com/containers/image 85d7559d44fd71f30e46e43d809bfbf88d11d916 github.com/containers/storage 243c4cd616afdf06b4a975f18c4db083d26b1641 github.com/containers/psgo 5dde6da0bc8831b35243a847625bcf18183bd1ee github.com/coreos/go-systemd v14 diff --git a/vendor/github.com/containers/image/copy/copy.go b/vendor/github.com/containers/image/copy/copy.go index 183993c5d..59354ea38 100644 --- a/vendor/github.com/containers/image/copy/copy.go +++ b/vendor/github.com/containers/image/copy/copy.go @@ -533,20 +533,21 @@ func (ic *imageCopier) copyLayer(ctx context.Context, srcInfo types.BlobInfo) (t if err != nil { return types.BlobInfo{}, "", err } - var diffIDResult diffIDResult // = {digest:""} if diffIDIsNeeded { select { case <-ctx.Done(): return types.BlobInfo{}, "", ctx.Err() - case diffIDResult = <-diffIDChan: + case diffIDResult := <-diffIDChan: if diffIDResult.err != nil { return types.BlobInfo{}, "", errors.Wrap(diffIDResult.err, "Error computing layer DiffID") } logrus.Debugf("Computed DiffID %s for layer %s", diffIDResult.digest, srcInfo.Digest) ic.c.cachedDiffIDs[srcInfo.Digest] = diffIDResult.digest + return blobInfo, diffIDResult.digest, nil } + } else { + return blobInfo, ic.c.cachedDiffIDs[srcInfo.Digest], nil } - return blobInfo, diffIDResult.digest, nil } // copyLayerFromStream is an implementation detail of copyLayer; mostly providing a separate “defer” scope. |