fix module-path-index->taglet bug that is mainly exposed when the current directory is a root directory
svn: r10231
This commit is contained in:
parent
20fcb6314c
commit
64147e45ab
|
@ -104,7 +104,7 @@
|
|||
;; Derive the name from the module path:
|
||||
(let ([p (collapse-module-path-index
|
||||
mod
|
||||
(current-directory))])
|
||||
(build-path (current-directory) "dummy"))])
|
||||
(if (path? p)
|
||||
;; If we got a path back anyway, then it's best to use the resolved
|
||||
;; name; if the current directory has changed since we
|
||||
|
|
|
@ -45,11 +45,18 @@
|
|||
|
||||
(define (combine-relative-elements elements)
|
||||
|
||||
(define (extract-base relto)
|
||||
(let-values ([(base n d?) (split-path relto)])
|
||||
(if (eq? base 'relative)
|
||||
'same
|
||||
(if (not base)
|
||||
relto ; strange case: relto is a root directory
|
||||
base))))
|
||||
|
||||
;; Used for 'file paths, so it's platform specific:
|
||||
(define (attach-to-relative-path relto)
|
||||
(apply build-path
|
||||
(let-values ([(base n d?) (split-path relto)])
|
||||
(if (eq? base 'relative) 'same base))
|
||||
(extract-base relto)
|
||||
(map (lambda (i) (if (bytes? i) (bytes->path i) i))
|
||||
elements)))
|
||||
|
||||
|
@ -58,8 +65,7 @@
|
|||
(cond
|
||||
[(or (path? relto-mp) (and (string? relto-mp) (ormap path? elements)))
|
||||
(apply build-path
|
||||
(let-values ([(base name dir?) (split-path relto-mp)])
|
||||
(if (eq? base 'relative) 'same base))
|
||||
(extract-base relto-mp)
|
||||
(map (lambda (x) (if (bytes? x) (bytes->path x) x))
|
||||
elements))]
|
||||
[(string? relto-mp)
|
||||
|
|
Loading…
Reference in New Issue
Block a user