From f3f23e4c3f13d6b281143c614b340318eb2f46a0 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 17 Dec 2013 06:09:59 -0700 Subject: [PATCH] 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 4fc71002e88fb6bd98e38126cc78cfc416c07061) --- pkgs/racket-pkgs/racket-index/setup/scribble.rkt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/racket-pkgs/racket-index/setup/scribble.rkt b/pkgs/racket-pkgs/racket-index/setup/scribble.rkt index b71e4e918b..098593c64e 100644 --- a/pkgs/racket-pkgs/racket-index/setup/scribble.rkt +++ b/pkgs/racket-pkgs/racket-index/setup/scribble.rkt @@ -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)