raco setup: more on docindex database creation

Commit 6ff7359212 didn't create a directory that might be missing
before trying to create a file in the directory.

Merge bug fix to v6.0 (pending review)
(cherry picked from commit 4fc71002e8)
This commit is contained in:
Matthew Flatt 2013-12-17 06:09:59 -07:00 committed by Ryan Culpepper
parent 9b9d35b290
commit f3f23e4c3f

View File

@ -230,8 +230,11 @@
;; Ensure that databases are created:
(define (touch-db db-file)
(doc-db-disconnect
(doc-db-file->connection db-file #t)))
(unless (file-exists? db-file)
(define-values (base name dir?) (split-path db-file))
(make-directory* base)
(doc-db-disconnect
(doc-db-file->connection db-file #t))))
(when (ormap can-build*? main-docs)
(touch-db main-db))
(when (ormap can-build*? user-docs)