From e0d4a45c93cfcee3b1b29636d18e9bb3d4bfff34 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 --- docs/handlers/blobupload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/handlers/blobupload.go b/docs/handlers/blobupload.go index 0f325184..1e3bff95 100644 --- a/docs/handlers/blobupload.go +++ b/docs/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) } }