From 40027e8b1d2d3d9760cb11a199b9f43db9056399 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 5 Apr 2014 16:40:43 -0600 Subject: [PATCH] pkg/path: fix for when the argument = a pkgs install directory --- pkgs/racket-pkgs/racket-test/tests/pkg/path.rkt | 4 +++- racket/collects/pkg/path.rkt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/racket-pkgs/racket-test/tests/pkg/path.rkt b/pkgs/racket-pkgs/racket-test/tests/pkg/path.rkt index fdd0faeedb..4019a07541 100644 --- a/pkgs/racket-pkgs/racket-test/tests/pkg/path.rkt +++ b/pkgs/racket-pkgs/racket-test/tests/pkg/path.rkt @@ -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"))) diff --git a/racket/collects/pkg/path.rkt b/racket/collects/pkg/path.rkt index 7c0f436670..c19934cd03 100644 --- a/racket/collects/pkg/path.rkt +++ b/racket/collects/pkg/path.rkt @@ -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))))