mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 13:16:36 +02:00
Handling case where opendir fails in directory-fold-tree.
This commit is contained in:
parent
8ddee1f704
commit
3c8c1fe74b
1 changed files with 12 additions and 11 deletions
|
@ -49,6 +49,7 @@
|
||||||
(cond
|
(cond
|
||||||
((file-directory? file)
|
((file-directory? file)
|
||||||
(let ((d (opendir file)))
|
(let ((d (opendir file)))
|
||||||
|
(if (not d)
|
||||||
(let lp ((acc acc))
|
(let lp ((acc acc))
|
||||||
(let ((e (readdir d)))
|
(let ((e (readdir d)))
|
||||||
(cond
|
(cond
|
||||||
|
@ -59,7 +60,7 @@
|
||||||
(let ((path (string-append file "/" f)))
|
(let ((path (string-append file "/" f)))
|
||||||
(lp (fold path (down path acc)))))))
|
(lp (fold path (down path acc)))))))
|
||||||
(else
|
(else
|
||||||
(up file acc)))))))
|
(up file acc))))))))
|
||||||
(else
|
(else
|
||||||
(here file acc))))))
|
(here file acc))))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue