(zilch core vfs): fix vfs-subdir
This commit is contained in:
parent
cab43001e6
commit
063550ca00
1 changed files with 6 additions and 6 deletions
|
|
@ -100,13 +100,13 @@
|
||||||
(if (string=? subdir "")
|
(if (string=? subdir "")
|
||||||
vfs
|
vfs
|
||||||
(make-vfs
|
(make-vfs
|
||||||
(mapping-map
|
(mapping-fold
|
||||||
(lambda (key value)
|
(lambda (key value acc)
|
||||||
(cond
|
(cond
|
||||||
((string=? (car key) subdir) (values (cons "" (cdr key)) value))
|
((string=? (car key) subdir) (mapping-set! acc (cons "" (cdr key)) value))
|
||||||
((string-prefix? subdirprefix (car key)) (values (cons (string-copy (car key) subdirprefixlength) (cdr key)) value))
|
((string-prefix? subdirprefix (car key)) (mapping-set! acc (cons (string-copy (car key) subdirprefixlength) (cdr key)) value))
|
||||||
(else (values))))
|
(else acc)))
|
||||||
(make-default-comparator)
|
(mapping (make-default-comparator))
|
||||||
(vfs-contents vfs)))))
|
(vfs-contents vfs)))))
|
||||||
|
|
||||||
;; Generates a full VFS structure from an on-disk directory.
|
;; Generates a full VFS structure from an on-disk directory.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue