handle 'relative directory correctly (fixes #252)

pull/253/head
Matthew Butterick 4 years ago
parent 6adebb8368
commit 36f075edba

@ -223,7 +223,10 @@
(define-values (dir-for-resolving-paths pt) (define-values (dir-for-resolving-paths pt)
(match pt-or-path (match pt-or-path
[(? pagetree?) (values (current-project-root) pt-or-path)] [(? pagetree?) (values (current-project-root) pt-or-path)]
[_ (values (dirname (->path pt-or-path)) (cached-doc pt-or-path))])) [_ (define dir (match (dirname (->path pt-or-path))
['relative (current-project-root)]
[dir dir]))
(values dir (cached-doc pt-or-path))]))
(parameterize ([current-directory dir-for-resolving-paths]) (parameterize ([current-directory dir-for-resolving-paths])
(map ->complete-path (pagetree->list pt)))) (map ->complete-path (pagetree->list pt))))

@ -1 +1 @@
1615307759 1615316593

Loading…
Cancel
Save