make it possible for the procedure in fold-files to signal skipping a directory
svn: r3695
This commit is contained in:
parent
c766cf9f8e
commit
38d5a59a3c
|
@ -478,9 +478,13 @@
|
|||
(define (do-path path acc)
|
||||
(cond [(and (not follow-links?) (link-exists? path)) (f path 'link acc)]
|
||||
[(directory-exists? path)
|
||||
(do-paths (map (lambda (p) (build-path path p))
|
||||
(directory-list path))
|
||||
(f path 'dir acc))]
|
||||
(call-with-values (lambda () (f path 'dir acc))
|
||||
(lambda (acc . descend?)
|
||||
(if (if (pair? descend?) (car descend?) #t)
|
||||
(do-paths (map (lambda (p) (build-path path p))
|
||||
(directory-list path))
|
||||
acc)
|
||||
acc)))]
|
||||
[(file-exists? path) (f path 'file acc)]
|
||||
[(link-exists? path) (f path 'link acc)] ; dangling links
|
||||
[else (error 'fold-files "path disappeared: ~e" path)]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user