From 3ef917c269120f7eabb6000fcce9eeb72c3d3c8f Mon Sep 17 00:00:00 2001 From: Brian Bland Date: Wed, 13 Jan 2016 19:20:02 -0800 Subject: [PATCH] Fixes cross-repo blob mounting in the BlobUploadHandler Accidentally checked for err != nil instead of err == nil :/ Also now ensures that only a non-nil option is appended to the create options slice Signed-off-by: Brian Bland --- registry/handlers/blobupload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/handlers/blobupload.go b/registry/handlers/blobupload.go index 0f3251845..1e3bff955 100644 --- a/registry/handlers/blobupload.go +++ b/registry/handlers/blobupload.go @@ -127,7 +127,7 @@ func (buh *blobUploadHandler) StartBlobUpload(w http.ResponseWriter, r *http.Req if mountDigest != "" && fromRepo != "" { opt, err := buh.createBlobMountOption(fromRepo, mountDigest) - if err != nil { + if opt != nil && err == nil { options = append(options, opt) } }