don't fail when there's no user-specific docindex

This commit is contained in:
Matthew Flatt 2012-11-24 05:27:16 -07:00
parent 777a6cd38b
commit 19d7519dfe

View File

@ -86,7 +86,10 @@
(or (and (box-cas! (cdr p) maybe-db #f)
maybe-db)
;; ... create a new one
(doc-db-file->connection (car p)))])
(and (file-exists? (car p))
(doc-db-file->connection (car p))))])
(and
db
((let/ec esc
;; The db query:
(define result
@ -99,7 +102,7 @@
;; cache the connection, if none is already cached:
(or (box-cas! (cdr p) #f db)
(doc-db-disconnect db))
(lambda () result))))))
(lambda () result)))))))
(define dest (or (try main-db) (try user-db)))
(and dest
((dest->source done-ht) dest))]