Check result of reading linklet hash.

This commit is contained in:
Sam Tobin-Hochstadt 2018-12-06 09:34:10 -05:00
parent 404964ea08
commit b1e765ca31

View File

@ -43,6 +43,16 @@
(define b-ht (if as-correlated-linklet?
(read-correlated-linklet-bundle-hash in)
(read-linklet-bundle-hash in)))
(unless (hash? b-ht)
(raise-arguments-error 'read-linklet-bundle-hash
"bad read result"
"expected" "hash/c"
"found" (format "~s" b-ht)
"in" (let ([n (object-name in)])
(if (path? n)
(path->string n)
in))))
(hash->linklet-bundle
(add-hash-code (if initial?
(strip-submodule-references b-ht)