diff --git a/src/Makefile b/src/Makefile index e998474..c8bb7de 100644 --- a/src/Makefile +++ b/src/Makefile @@ -220,7 +220,7 @@ members-payments.import.scm: $(MEMBERS-PAYMENTS-SOURCES) WEB-STATIC-SOURCES=web-static.scm member-record.import.scm \ utils.import.scm configuration.import.scm \ - members-payments.import.scm + members-payments.import.scm members-base.import.scm web-static.o: web-static.import.scm web-static.import.scm: $(WEB-STATIC-SOURCES) diff --git a/src/web-static.scm b/src/web-static.scm index ffd7151..e4974cd 100644 --- a/src/web-static.scm +++ b/src/web-static.scm @@ -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)))))