From 1fa80c84e09fd3a262118e2dd0884523286f05e0 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 22 Apr 2013 08:39:17 -0600 Subject: [PATCH] pkg/lib: fix `get-pkg-content' When discovering modules, handle the case that a directory name doesn't work as a collection name. --- collects/pkg/lib.rkt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/collects/pkg/lib.rkt b/collects/pkg/lib.rkt index 335aa8c12e..c88365709e 100644 --- a/collects/pkg/lib.rkt +++ b/collects/pkg/lib.rkt @@ -1712,11 +1712,13 @@ #:when (file-exists? f) #:when (regexp-match? #rx#"[.](rkt|ss)$" (path->bytes f)) #:when (let-values ([(base name dir?) (split-path f)]) - (not (eq? 'relative base)))) - (define m (apply ~a - #:separator "/" - (map path-element->string - (explode-path f)))) + (not (eq? 'relative base))) + [m (in-value + (apply ~a + #:separator "/" + (map path-element->string + (explode-path f))))] + #:when (module-path? `(lib ,m))) ;; normalize the path: (collapse-module-path `(lib ,m) dummy)))))