reformat, etc
svn: r15361
This commit is contained in:
parent
e0e8c86688
commit
c072d23baf
|
@ -316,32 +316,34 @@
|
||||||
null path)))
|
null path)))
|
||||||
|
|
||||||
(define (pathlist-closure paths)
|
(define (pathlist-closure paths)
|
||||||
(let loop ([paths (map (lambda (p)
|
(let loop ([paths
|
||||||
(let ([p2 (if (link-exists? p)
|
(map (lambda (p)
|
||||||
(let ([p2 (resolve-path p)])
|
(simplify-path
|
||||||
(if (relative-path? p2)
|
(if (link-exists? p)
|
||||||
(let-values ([(base name dir?) (split-path p)])
|
(let ([p2 (resolve-path p)])
|
||||||
(build-path base p2))
|
(if (relative-path? p2)
|
||||||
p2))
|
(let-values ([(base name dir?) (split-path p)])
|
||||||
p)])
|
(build-path base p2))
|
||||||
(simplify-path p2 #f)))
|
p2))
|
||||||
paths)]
|
p)
|
||||||
|
#f))
|
||||||
|
paths)]
|
||||||
[r '()])
|
[r '()])
|
||||||
(if (null? paths)
|
(if (null? paths)
|
||||||
(reverse r)
|
(reverse r)
|
||||||
(let loop2 ([path (car paths)]
|
(let loop2 ([path (car paths)]
|
||||||
[new (cond [(file-exists? (car paths))
|
[new (cond [(file-exists? (car paths))
|
||||||
(list (car paths))]
|
(list (car paths))]
|
||||||
[(directory-exists? (car paths))
|
[(directory-exists? (car paths))
|
||||||
(find-files void (car paths))]
|
(find-files void (car paths))]
|
||||||
[else (error 'pathlist-closure
|
[else (error 'pathlist-closure
|
||||||
"file/directory not found: ~a"
|
"file/directory not found: ~a"
|
||||||
(car paths))])])
|
(car paths))])])
|
||||||
(let-values ([(base name dir?) (split-path path)])
|
(let-values ([(base name dir?) (split-path path)])
|
||||||
(if (path? base)
|
(if (path? base)
|
||||||
(loop2 base (if (or (member base r) (member base paths))
|
(loop2 base (if (or (member base r) (member base paths))
|
||||||
new (cons base new)))
|
new (cons base new)))
|
||||||
(loop (cdr paths) (append (reverse new) r))))))))
|
(loop (cdr paths) (append (reverse new) r))))))))
|
||||||
|
|
||||||
(define (check-path who f)
|
(define (check-path who f)
|
||||||
(unless (path-string? f)
|
(unless (path-string? f)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user