mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-23 12:00:21 +02:00
ftw: Include sub-directories in the result of `scandir'.
* module/ice-9/ftw.scm (scandir)[skip]: Keep NAME in the resulting list. * test-suite/tests/ftw.test ("scandir")["top-srcdir"]: New test.
This commit is contained in:
parent
52b680f85e
commit
a2c66014cf
2 changed files with 13 additions and 1 deletions
|
@ -530,7 +530,7 @@ of file names is sorted according to ENTRY<?, which defaults to
|
|||
|
||||
(define (skip name stat result)
|
||||
;; All the sub-directories are skipped.
|
||||
result)
|
||||
(cons (basename name) result))
|
||||
|
||||
(and=> (file-system-fold enter? leaf down up skip #f name stat)
|
||||
(lambda (files)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue