diff --git a/tools/schemify-tree.scm b/tools/schemify-tree.scm index ee4e886..404fe25 100644 --- a/tools/schemify-tree.scm +++ b/tools/schemify-tree.scm @@ -23,10 +23,10 @@ ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ;; (import (chicken process-context) - srfi-4 (chicken file) (chicken pathname) - (chicken format)) + (chicken format) + (chicken io)) (define (get-argv) (let* ((args (argv)) @@ -78,8 +78,11 @@ (if (null? tree) alst (let* ((fpath (car tree)) - (key (substring fpath dir-len)) - (value (with-input-from-file fpath read-u8vector))) + (key0 (substring fpath dir-len)) + (key (if (eq? (string-ref key0 0) #\/) + (substring key0 1) + key0)) + (value (with-input-from-file fpath read-string))) (loop (cdr tree) (cons (cons key value) alst)))))))