mirror of https://github.com/perkeep/perkeep.git
publish handler: errors out if rootPermanode is not a valid blobRef
http://camlistore.org/issue/164 Change-Id: If7c305f4c7a89eb67aabaf844b9e4aa111985b24
This commit is contained in:
parent
ffad34ef94
commit
bb60c7c887
|
@ -114,6 +114,9 @@ func newPublishFromConfig(ld blobserver.Loader, conf jsonconfig.Obj) (h http.Han
|
|||
h, _ := ld.GetHandler(rootNode[0])
|
||||
jsonSign := h.(*signhandler.Handler)
|
||||
pn := blobref.Parse(rootNode[1])
|
||||
if pn == nil {
|
||||
return nil, fmt.Errorf("Invalid \"rootPermanode\" value; was expecting a blobRef, got %q.", rootNode[1])
|
||||
}
|
||||
if err := ph.setRootNode(jsonSign, pn); err != nil {
|
||||
return nil, fmt.Errorf("error setting publish root permanode: %v", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue