Fix web-static to work with new data structures.

This commit is contained in:
Dominik Pantůček 2023-04-04 23:07:19 +02:00
parent 993dce8750
commit f3cf268a3c
2 changed files with 7 additions and 4 deletions

View file

@ -39,10 +39,12 @@
(chicken process-context)
(chicken pathname)
(chicken file)
(chicken file posix)
member-record
utils
configuration
members-payments)
members-payments
members-base)
;; Generate all the files in specified (default current) directory.
(define (gen-web-static-member mr . dirs)
@ -79,11 +81,12 @@
;; Generates all member files in given directory
(define (gen-web-static mb dir)
(when (file-exists? dir)
(when (and (file-exists? dir)
(regular-file? dir))
(error 'gen-web-static "Directory is a file:" dir))
(when (not (directory-exists? dir))
(create-directory dir))
(let loop ((mb mb))
(let loop ((mb (members-base-members mb)))
(when (not (null? mb))
(gen-web-static-member (car mb) dir)
(loop (cdr mb)))))