summaryrefslogtreecommitdiff
path: root/src/file-backend.lisp
diff options
context:
space:
mode:
authorPiotr Szarmanski2022-10-24 10:50:11 +0200
committerPiotr Szarmanski2022-10-24 10:50:11 +0200
commitc4b44fb12108c0764d1fa4ef1c37f11a54379343 (patch)
treeb5bb4d586e7973537608b73a7def903667c33f42 /src/file-backend.lisp
parent087b4ea280caa05e7213eb2b051782086c96efba (diff)
Add hash-backend and update README.
Diffstat (limited to 'src/file-backend.lisp')
-rw-r--r--src/file-backend.lisp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/file-backend.lisp b/src/file-backend.lisp
index 2bb8693..03e3ef7 100644
--- a/src/file-backend.lisp
+++ b/src/file-backend.lisp
@@ -43,7 +43,9 @@
(lambda (reference)
(let* ((base32 (bytes-to-base32-unpadded reference))
(file (merge-pathnames directory base32)))
- (alexandria:read-file-into-byte-vector file)))
+ (if (probe-file file)
+ (alexandria:read-file-into-byte-vector file)
+ (error 'missing-block :reference reference))))
output-function
(lambda (block reference)
(let* ((base32 (bytes-to-base32-unpadded reference))