From d56d28f0b615519810ba22de51ce6c2b3f1cd52f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 9 Jan 2012 16:46:37 -0700 Subject: [PATCH] protect `raco setup' from files in linked collection dirs Patch by Jay McCarthy. Merge to 5.2.1 --- collects/setup/setup-unit.rkt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/collects/setup/setup-unit.rkt b/collects/setup/setup-unit.rkt index b5dafdf4a9..748cb4844a 100644 --- a/collects/setup/setup-unit.rkt +++ b/collects/setup/setup-unit.rkt @@ -305,7 +305,8 @@ (maybe (list (string->path c)) ->cc)) (for ([cp (in-list (links #:root? #t #:user? #f))] #:when (directory-exists? cp) - [collection (directory-list cp)]) + [collection (directory-list cp)] + #:when (directory-exists? (build-path cp collection))) (maybe (list collection) ->cc))) (when (make-user) (let ([user-collects (find-user-collects-dir)]) @@ -318,7 +319,8 @@ (maybe (list (string->path c)) ->cc)) (for ([cp (in-list (links #:root? #t))] #:when (directory-exists? cp) - [collection (directory-list cp)]) + [collection (directory-list cp)] + #:when (directory-exists? (build-path cp collection))) (maybe (list collection) ->cc)))) (hash-map ht (lambda (k v) v))))