pkg/lib: fix `get-pkg-content'
When discovering modules, handle the case that a directory name doesn't work as a collection name.
This commit is contained in:
parent
4cc320e49d
commit
1fa80c84e0
|
@ -1712,11 +1712,13 @@
|
||||||
#:when (file-exists? f)
|
#:when (file-exists? f)
|
||||||
#:when (regexp-match? #rx#"[.](rkt|ss)$" (path->bytes f))
|
#:when (regexp-match? #rx#"[.](rkt|ss)$" (path->bytes f))
|
||||||
#:when (let-values ([(base name dir?) (split-path f)])
|
#:when (let-values ([(base name dir?) (split-path f)])
|
||||||
(not (eq? 'relative base))))
|
(not (eq? 'relative base)))
|
||||||
(define m (apply ~a
|
[m (in-value
|
||||||
|
(apply ~a
|
||||||
#:separator "/"
|
#:separator "/"
|
||||||
(map path-element->string
|
(map path-element->string
|
||||||
(explode-path f))))
|
(explode-path f))))]
|
||||||
|
#:when (module-path? `(lib ,m)))
|
||||||
;; normalize the path:
|
;; normalize the path:
|
||||||
(collapse-module-path `(lib ,m) dummy)))))
|
(collapse-module-path `(lib ,m) dummy)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user