pkg/path: fix for when the argument = a pkgs install directory

This commit is contained in:
Matthew Flatt 2014-04-05 16:40:43 -06:00
parent 7a1fe139a5
commit 40027e8b1d
2 changed files with 4 additions and 2 deletions

View File

@ -21,8 +21,10 @@
(check-equal? (path->pkg (build-path (find-pkgs-dir) "pkgs.rktd"))
#f)
(check-equal? (path->pkg (find-pkgs-dir))
#f)
(check-equal? (call-with-values
(lambda () (path->pkg+subpath+collect (collection-file-path "serve-catalog.rkt" "distro-build")))
list)
(list "distro-build" (build-path "serve-catalog.rkt") "distro-build")))
(list "distro-build-server" (build-path "serve-catalog.rkt") "distro-build")))

View File

@ -81,7 +81,7 @@
(normal-case-path
(simplify-path (path->complete-path p)))))
(define (sub-path? < p d)
(and ((length d) . <= . (length p))
(and ((length d) . < . (length p))
(for/and ([de (in-list d)]
[pe (in-list p)])
(equal? de pe))))