diff --git a/pkgs/racket-pkgs/racket-doc/scribblings/reference/collects.scrbl b/pkgs/racket-pkgs/racket-doc/scribblings/reference/collects.scrbl index 80897a79d9..89aa10bead 100644 --- a/pkgs/racket-pkgs/racket-doc/scribblings/reference/collects.scrbl +++ b/pkgs/racket-pkgs/racket-doc/scribblings/reference/collects.scrbl @@ -249,11 +249,13 @@ initialized @racket[current-library-collection-links], as follows: @defproc*[([(collection-file-path [file path-string?] [collection path-string?] ...+ - [#:check-compiled? check-compiled? any/c #f]) + [#:check-compiled? check-compiled? any/c + (regexp-match? #rx"[.]rkt$" file)]) path?] [(collection-file-path [file path-string?] [collection path-string?] ...+ [#:fail fail-proc (string? . -> . any)] - [#:check-compiled? check-compiled? any/c #f]) + [#:check-compiled? check-compiled? any/c + (regexp-match? #rx"[.]rkt$" file)]) any])]{ Returns the path to the file indicated by @racket[file] in the diff --git a/racket/collects/racket/private/pre-base.rkt b/racket/collects/racket/private/pre-base.rkt index 264cbd3313..cb913ae63d 100644 --- a/racket/collects/racket/private/pre-base.rkt +++ b/racket/collects/racket/private/pre-base.rkt @@ -112,7 +112,9 @@ (define-values (new:collection-file-path) (let ([collection-file-path (new-lambda (file-name collection - #:check-compiled? [check-compiled? #f] + #:check-compiled? [check-compiled? + (and (path-string? file-name) + (regexp-match? #rx"[.]rkt$" file-name))] #:fail [fail (lambda (s) (raise (exn:fail:filesystem