further repair for test with 'same in compiled-file-roots

This commit is contained in:
Matthew Flatt 2021-02-21 15:11:32 -07:00
parent 5e9535b3a5
commit 6099ec80b3

View File

@ -193,9 +193,13 @@
(test (file-or-directory-modify-seconds
(let ([dir (path-only (collection-file-path "zip.rkt" "file"))])
(for/or ([root (in-list (current-compiled-file-roots))])
(define file (if (relative-path? root)
(build-path dir root compiled-dir "zip_rkt.zo")
(build-path (reroot-path dir root) compiled-dir "zip_rkt.zo")))
(define file (cond
[(eq? root 'same)
(build-path dir compiled-dir "zip_rkt.zo")]
[(relative-path? root)
(build-path dir root compiled-dir "zip_rkt.zo")]
[else
(build-path (reroot-path dir root) compiled-dir "zip_rkt.zo")]))
(and (file-exists? file)
file))))
car