Skip to content

Commit 4a28d59

Browse files
Avoid needing to use splitpath for path separator rewrites
1 parent 553fe8f commit 4a28d59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utilities.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,10 @@ function url(m::Method)
530530
root = get(ENV, "TRAVIS_BUILD_DIR", nothing)
531531
root === nothing && return ""
532532

533-
file = string(m.file)
534-
if startswith(file, root) || startswith(realpath(file), root)
533+
file = realpath(string(m.file))
534+
if startswith(file, root)
535+
filename = join(split(relpath(file, root), @static Sys.iswindows() ? '\\' : '/'), '/')
535536
base = "https://github.com/$repo/tree"
536-
filename = join(splitpath(lstrip(file[(length(root)+1):end], '/')), '/')
537537
return "$base/$commit/$filename#L$(m.line)"
538538
else
539539
return ""

0 commit comments

Comments
 (0)