fix a corner case for `find-relative-path'

This commit is contained in:
Matthew Flatt 2011-09-16 18:02:48 -06:00
parent 6401b30399
commit 5d10dceaf5

View File

@ -144,7 +144,9 @@
(let loop ([dir (cdr dir)]
[file (cdr file)])
(cond [(null? dir) (if (null? file) filename (apply build-path file))]
[(null? file) (apply build-path (map (lambda (x) 'up) dir))]
[(null? file) (apply build-path/convention-type
(path-convention-type filename)
(map (lambda (x) 'up) dir))]
[(equal? (car dir) (car file))
(loop (cdr dir) (cdr file))]
[else