Skip to content

Commit

Permalink
repair "info-cache.rktd" assumption of relative paths
Browse files Browse the repository at this point in the history
Fix for 459a744 to handle the case that a path
to record is not relative. The `raco pkg` tests
exposed the problem.
  • Loading branch information
mflatt committed Apr 9, 2017
1 parent 50f67cf commit 016b800
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions racket/collects/setup/setup-core.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -1278,10 +1278,12 @@
(let ([p (path->main-lib-relative (cc-path cc))])
(if (path? p)
;; Fall back to relative (with ".."s) to info root:
(encode-relative-path
(find-relative-path (cc-info-root cc)
p
#:more-than-root? #t))
(let ([rp (find-relative-path (cc-info-root cc)
p
#:more-than-root? #t)])
(if (relative-path? rp)
(encode-relative-path rp)
(path->bytes rp)))
p))]
[else (path->bytes (cc-path cc))])
(cons (domain) (cc-shadowing-policy cc)))))
Expand Down

0 comments on commit 016b800

Please sign in to comment.