create directories that are specified but missing, use open-output-nowhere

svn: r11810
This commit is contained in:
Eli Barzilay 2008-09-18 19:42:30 +00:00
parent f22c42d8a4
commit bafb87990d
3 changed files with 7 additions and 9 deletions

View File

@ -100,10 +100,11 @@
(define (paths->map dirs) (define (paths->map dirs)
(define (path->name dir) (define (path->name dir)
(unless (directory-exists? dir) (unless (directory-exists? dir)
(error 'get-conf (if (file-exists? dir)
"directory entry for an inexistent directory: ~e" dir)) (error 'get-conf "directory entry points at a file: ~e" dir)
(make-directory* dir)))
(let-values ([(_1 name _2) (split-path dir)]) (let-values ([(_1 name _2) (split-path dir)])
(bytes->string/locale (path-element->bytes name)))) (path-element->string name)))
(let ([names (map path->name dirs)]) (let ([names (map path->name dirs)])
(append (map list names dirs) (map list dirs names)))) (append (map list names dirs) (map list dirs names))))

View File

@ -35,11 +35,7 @@
;; output the line on the output port ;; output the line on the output port
(define (make-logger-port out log) (define (make-logger-port out log)
(if (and (not out) (not log)) (if (and (not out) (not log))
;; /dev/null-like output port (open-output-nowhere)
(make-output-port 'nowhere
always-evt
(lambda (buf start end imm? break?) (- end start))
void)
(let ([prompt? #t] (let ([prompt? #t]
[sema (make-semaphore 1)] [sema (make-semaphore 1)]
[outp (cond [(not log) out] [outp (cond [(not log) out]

View File

@ -32,7 +32,8 @@ This directory contains the following files and sub-directories:
absolute; the last path element for each of these (and absolute; the last path element for each of these (and
@scheme[inactive-dirs] below) should be unique, and is used to @scheme[inactive-dirs] below) should be unique, and is used to
identify the submission (for example, in the client's submission identify the submission (for example, in the client's submission
dialog and in the status servlet).} dialog and in the status servlet). If a specified directory does
not exist, it will be created.}
@item{@indexed-scheme[inactive-dirs] --- a list of inactive @item{@indexed-scheme[inactive-dirs] --- a list of inactive
submission directories (see above for details).} submission directories (see above for details).}