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)
|
(define (do-path path acc)
|
||||||
(cond [(and (not follow-links?) (link-exists? path)) (f path 'link acc)]
|
(cond [(and (not follow-links?) (link-exists? path)) (f path 'link acc)]
|
||||||
[(directory-exists? path)
|
[(directory-exists? path)
|
||||||
|
(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))
|
(do-paths (map (lambda (p) (build-path path p))
|
||||||
(directory-list path))
|
(directory-list path))
|
||||||
(f path 'dir acc))]
|
acc)
|
||||||
|
acc)))]
|
||||||
[(file-exists? path) (f path 'file acc)]
|
[(file-exists? path) (f path 'file acc)]
|
||||||
[(link-exists? path) (f path 'link acc)] ; dangling links
|
[(link-exists? path) (f path 'link acc)] ; dangling links
|
||||||
[else (error 'fold-files "path disappeared: ~e" path)]))
|
[else (error 'fold-files "path disappeared: ~e" path)]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user